1

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.

  • 1
    Does tui enable then layout asm work? – kemotep Mar 14 at 17:30
  • @kemotep I get Undefined command: "tui" – Maxim Mar 14 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 Mar 14 at 18:52
  • What's the first line of the output of gdb --version ? – Mark Plotnick Mar 14 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. – Mark Plotnick Mar 15 at 19:59
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.