4

When debugging it is often helpful to loot at assembly, but on Debian 9 when I try layout asm I get:

Undefined command: "layout". Try "help".

According to some internet research it seems like I need to have TUI enabled, but I'm not sure how to enable or install it.

9
  • 1
    Does tui enable then layout asm work?
    – kemotep
    Commented Mar 14, 2019 at 17:30
  • 1
    @kemotep I get Undefined command: "tui"
    – Maxim
    Commented Mar 14, 2019 at 18:38
  • You need to be in a gdb console. Invoke your program using gdb or gdb [name of the executable you wish to debug]. You can also launch gdb with --tui to immediately enter TUI mode. If this is unsupported then your install of gdb was not configured with TUI support and you will need to reinstall or recompile gdb to include these features.
    – kemotep
    Commented Mar 14, 2019 at 18:52
  • What's the first line of the output of gdb --version ? Commented Mar 14, 2019 at 20:34
  • 2
    OK, I reproduced this. Installing Debian 9 from the netinst iso installs the gdb-minimal package, which doesn't have tui or python support. Do sudo apt install gdb to get the full version. This will also remove gdb-minimal. Commented Mar 15, 2019 at 19:59

1 Answer 1

7

The default installation from Debian 9's netinst ISO doesn't include gdb or C or C++ compilers. A user would typically run apt install build-essential gdb to install them.

In certain circumstances - I could reproduce this by using the netinst ISO and choosing to install KDE - the gdb-minimal package will be installed, which provides a gdb that doesn't include TUI (or python).

mp@debian9$ apt-rdepends -r gdb-minimal
gdb-minimal
  Reverse Depends: plasma-workspace (4:5.8.6-2.1+deb9u1)
plasma-workspace
  Reverse Depends: kde-plasma-desktop (>= 5:92)
  ...
kde-plasma-desktop
  Reverse Depends: kde-full (>= 5:92)
  Reverse Depends: kde-standard (>= 5:92)

It looks like you have this.

Running apt install gdb will remove gdb-minimal and install the full gdb.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .