[PATCH] Fix alignment of disassemble /r

Doug Evans dje@google.com
Thu Apr 17 16:27:00 GMT 2014


On Thu, Apr 17, 2014 at 7:37 AM, Daniel Gutson
<daniel.gutson@tallertechnologies.com> wrote:
> So what if I add a new configuration variable, such as
>      set disassemble-raw-alignment
> with "off" as default, and if set to on, pad to gdbarch_max_insn_length ?

Presumably some frontends will do their own alignment.

If we went with disassemble-raw-alignment, a boolean value won't help
x86 much, it's either no alignment or (in general) too much
whitespace.
An improvement would be a value from min-insn-length to
max-insn-length, but that would be problematic in a multi-arch
debugging scenario.

If we could agree on some minimum alignment for each variable-length
ISA (5 would be fine for me for x86) then maybe a boolean value could
be useful ("off" = no alignment, "on" = employ arch-specific minimum).

OTOH, what if we made two passes over the instructions, with the first
pass computing the maximum instruction length that is present?
[And maybe only doing this for CLI.]



More information about the Gdb-patches mailing list