[PATCH] Changes to disassemble command

Joel Brobecker brobecker@adacore.com
Tue Dec 14 07:42:00 GMT 2010


Andrew,

> The patch below addresses a number of issues relating to the disassemble
> command. These are,

I was going to quickly review the patch before sending comments, but
I am running out of time for today.  It really helps if you split
patches into individual changes. So unless the fix for the three
issues are really intermingled, I'd rather have 3 patches (in practice,
I can only review the first two, since MI is outside of my comfort zone).

> 2010-12-10  Andrew Burgess  <aburgess@broadcom.com>
> 
>          * disasm.c (compare_lines): Sort by PC for entries where
>            the line number is 0, these are the end of sequence markers.
>            (dump_insns): Return the number of instructions dumped, and
>            the next PC at which dumping should resume. Build the opcodes
>            into a stream so that we can dump them as a field for MI.
>            (do_mixed_source_and_assembly): Don't include the end of
>            sequence marker in the list of lines to dump. Return the next
>            address to disassemble from. Move the asm_insns list to
>            gdb_disassembly.
>            (do_assembly_only): Also move the asm_insns list to
>            gdb_disassembly. Return the next address to disassemble from.
>            (gdb_disassembly): Create the asm_insns list here. When doing
>            mixed source and assembly disassembly keep going until we
>            reach the high address, dump raw instructions when no symbol
>            information is available.
>          * gdb.texinfo: Update to reflect changes in mi/mi-cmd-disas.c
> 
> 
> gdb/mi/
> 
> 2010-12-10  Andrew Burgess  <aburgess@broadcom.com>
> 
>          * mi-cmd-disas.c (mi_cmd_disassemble): Allow mode to control
>            dumping of instruction opcodes.
> 
> gdb/testsuite/
> 
> 2010-12-10  Andrew Burgess  <aburgess@broadcom.com>
> 
>          * gdb.disasm/disasm-end-cu-1.c, gdb.disasm/disasm-end-cu-2.c,
>            gdb.disasm/disasm-end-cu.exp: New test for disassembling over
>            the boundary between two compilation units.
>          * gdb.mi/mi-disassemble.exp, gdb.mi/mi2-disassemble.exp: Update
>            expected output to reflect changes in gdb/mi/mi-cmd-disas.c

Small comment: The indentation on the lines following the '*' are
incorrect. All lines should be aligned on the '*'.  Hence, for instance:

          * gdb.disasm/disasm-end-cu-1.c, gdb.disasm/disasm-end-cu-2.c,
          gdb.disasm/disasm-end-cu.exp: New test for disassembling over
          the boundary between two compilation units.
          * gdb.mi/mi-disassemble.exp, gdb.mi/mi2-disassemble.exp: Update
          expected output to reflect changes in gdb/mi/mi-cmd-disas.c

-- 
Joel



More information about the Gdb-patches mailing list