gdb/disasm: read opcodes bytes with a single read_code call
authorAndrew Burgess <aburgess@redhat.com>
Thu, 23 Jun 2022 10:49:08 +0000 (11:49 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Sun, 2 Oct 2022 10:57:30 +0000 (11:57 +0100)
commitd309a8f9b34d8fd570dc8c7189eb6790b9afd4e3
tree74bf9517a03cea105f7dd82f9ebfe87325dfab51
parent21a52f7d827dab6bf14f81f478e1f9c7bdc7f218
gdb/disasm: read opcodes bytes with a single read_code call

This commit reduces the number of times we call read_code when
printing the instruction opcode bytes during disassembly.

I've added a new gdb::byte_vector within the
gdb_pretty_print_disassembler class, in line with all the other
buffers that gdb_pretty_print_disassembler needs.  This byte_vector is
then resized as needed, and filled with a single read_code call for
each instruction.

There should be no user visible changes after this commit.
gdb/disasm.c
gdb/disasm.h