Search code examples
gdbarm64

gdb-dashboard not working (reverts to gdb TUI mode as soon as it starts)


I'm not sure if this question fits to stackoverflow but since it's related to debugging programs, I hope there would be people who can answer this question.
I found this that lead me to a fantastic looking tool called gdb-dashboard.

But after I install it by wget -P ~ https://git.io/.gdbinit, when I execute gdb by aarch64-none-elf-gdb u-boot.v2022.07/spl/u-boot-spl -x gdbsetup_uboot, I see the gdb running just like it used to run. It kind of tries to run as gdb-dashboard says it would but somehow reverts to the old manner of running it. By the way, I didn't do pip install pygments because the color highlight thing seems to work, though that mode disappears soon after gdb starts. Here is the screen cature of my gdb session. Can anyone tell me what's wrong with my setup? I'm running on terminator window on ubuntu 20.04. I tried it on simple 'Term' application, but it is the same.

https://youtu.be/-xz0HXoEGe8


Solution

  • I found I have to 'tui disable' before I use gdb-dashboard.(you can switch back to tui mode by 'tui enable')
    And then do 'dashboard -enabled on' to switch to dashboard or 'dashboard -enabled off' to switch it off.
    you can enable/disable each windows using 'dashboard -layout ...' command and you can increase the source window height by like 'dashboard source -style height 30'.
    If you disabled tui mode, you can scroll up/down for the dashboard output which contains all the information. As the manual says, when the inferior debugger stops running, the dashboard output is printed.