[Yocto] Enabling GDB TUI mode
Created:
Updated:
reference
https://docs.yoctoproject.org/
Enabling GDB TUI mode on yocto project
The gdb related bb files are located in the ~/meta/recipes-devtools/gdb folder.
ex)
- gdb_11.b.bb is for gdb on target device
- gdb-cross_11.1.bb is for gdb on host(for remote debugging)
The following is in gdb-common.inc file.
1
2
3
...
PACKAGECONFIG[tui] = "--enable-tui,--disable-tui"
...
So, in your layer, add append file(s) to your layer as shown below.
1
2
3
4
recipes-devtools/
└── gdb
├── gdb-%.bbappend // for gdb-cross-architecture
└── gdb_%.bbappend // for gdb on target device
Add the code below to each append file to add “–enable-tui” option.
1
PACKAGECONFIG:append = " tui "
For “gdb-cross-architecture”, refer to the link below to build and use. debugging with gdb on yocto project
How to add gdb/strace to image
add ‘tools-debug’ image feature, which corresponds to the ‘packagegroup-core-tools-debug’ package group to local.conf.
1
2
3
...
IMAGE_FEATURES:append = " tools-debug"
...
The relevant information is in the files below.
In meta/classes/core-image.bbclass
1
2
3
...
FEATURE_PACKAGES_tools-debug = "packagegroup-core-tools-debug"
...
In meta/recipes-core/packagegroups/packagegroup-core-tools-debug.bb
1
2
3
4
5
6
7
8
9
10
11
...
STRACE = "strace"
STRACE:riscv32 = ""
RDEPENDS:${PN} = "\
gdb \
gdbserver \
${MTRACE} \
${STRACE} \
"
...
Leave a comment