This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/3] Make "disassemble" always use TUI disassembly window
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 19 Jan 2020 23:23:27 +0000
- Subject: Re: [PATCH 2/3] Make "disassemble" always use TUI disassembly window
- References: <20191227235034.5453-1-tom@tromey.com> <20191227235034.5453-3-tom@tromey.com> <877e1n43ct.fsf@tromey.com>
* Tom Tromey <tom@tromey.com> [2020-01-19 13:07:30 -0700]:
> >>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
>
> Tom> Currently the "disassemble" command will use the TUI disassembly
> Tom> window if it is already showing. I think it makes more sense to
> Tom> unconditionally switch to it. This patch implements this.
>
> I wonder if this should be limited to the case where the options to
> disassemble are compatible with what the TUI does.
I've wondered for a while if we should have something like:
set tui disassemble-flags ...
where a user can set the flags used by the disassembler. My main
interest initially was /r, but it might be nice if /m and /s could be
supported too, though I'm not quite sure how that might look or work.
Anyway, if we had something like this then using a disassemble command
could effectively be an alternative path to set the flags. So
something like:
(gdb) show tui disassemble-flags
TUI will disassemble using no flags.
(gdb) disassemble /r 0x.....
# TUI ASM window updates, and includes opcodes.
(gdb) show tui disassemble-flags
TUI will disassemble using flags /r.
# User doesn't want the opcodes any more, no problem.
(gdb) set tui disassemble-flags # <-- passing nothing here to
# clear the flags
# TUI updates, but not longer shows opcodes.
Just a thought.
Thanks,
Andrew