atticus
atticus

Reputation: 180

debugging gdb tui define new layout

I'm trying to define an own new layout for the gdb tui mode (according to https://sourceware.org/gdb/current/onlinedocs/gdb/TUI-Commands.html#TUI-Commands, but everytime I enter the example (tui new-layout example src 1 regs 1 status 0 cmd 1) I get this error: Undefined tui command: "new-layout example src 1 regs 1 status 0 cmd 1". Try "help tui".

Any suggestions, what might be wrong (I'm already in TUI mode (tui enable) when entering the command)?

Upvotes: 2

Views: 2571

Answers (1)

JoeM
JoeM

Reputation: 46

I was having the same issues as you. Doesn't seem like that feature is in 9.1 even though the documentation shows it.

I tried building the GDB snapshot release 10.0.50.20200305-git and it had the tui new-layout feature.

You can find the snapshot releases here: ftp://sourceware.org/pub/gdb/snapshots/current/

Here is what I did:

cd ~/src
tar xf gdb-10.0.50.20200306.tar.xz
mkdir gdb
cd gdb
~/src/gdb-10.5.50.20200306/configure --enable-tui
make
 ~/src/gdb/gdb/gdb  --version
GNU gdb (GDB) 10.0.50.20200306-git

Then I just ran gdb from ~/src/gdb on an executable. I could then do

tui new-layout example regs 19 src 21 cmd 20

However, it didn't persist after restarting gdb. But I could switch to it if I didn't exit.

layout asm
layout regs
layout example

Not sure if the layout is supposed to persist after exiting and starting?

Upvotes: 3

Related Questions