Re: Question about disassembly

Ruslan Kabatsayev via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAHEcG94LnD0jg0tYESVM1A=6mGEeT83amggJX4am7qcvJ5ku=g@mail.gmail.com>
On Thu, 11 Mar 2021 at 16:10, Andreas Schwab <[email protected]> wrote:
>
> On Mär 11 2021, Andrew Dinn via Gdb wrote:
>
> > You will probably want to print the next instruction after each step which
> > can be done using x/i $pc.
>
> You can do that with disp/i $pc.

Or, maybe even easier, use TUI. Namely, issue the command "layout
asm", and you won't need disp/i. (Press Ctrl-x followed by "a" key to
return to normal, non-TUI, mode.)
You may also find Single Key mode of the TUI useful. To use it, in the
TUI press Ctrl-x followed by key "s". Now you can step into
instruction by single key "i" (as if using "stepi"), and step over by
key "o" (as if using "nexti"). To exit single-key mode hit "q" key.
For more single-key commands see "TUI Single Key Mode" in the docs
[1].

[1]: https://sourceware.org/gdb/onlinedocs/gdb/TUI-Single-Key-Mode.html

>
> Andreas.
>
> --
> Andreas Schwab, [email protected]
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
> "And now for something completely different."
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.