This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/3 V2] [aarch64] Use opcodes to decode instructions in GDB

Hi Marcus,

On 02/10/15 08:51, Marcus Shawcroft wrote:
> I'll let others comment on the gdb aspect of this patch, w.r.t
> opcodes, the aarch64-dis.h header is internal to opcodes.  The public
> interface to opcodes is exposed via  include/opcode/aarch64.h or
> include/dis-asm.h.  The latter exposes just the cross architecture
> disassembler interface so I think  includes/opcode/aarch64.h is the
> right choice in this case.

OK, I move the declaration to includes/opcode/aarch64.h in V2.

> Before we expose this function, can we put in a patch to rename it to
> following the name space convention used by the other exposed
> functions, something like aarch64_disassemble_insn.? I think we should

Patch #2 in V2 does this, but renames it to aarch64_decode_insn,
because aarch64_decode_insn can be used in disassemble, but also in
something else.

> take the patch to drop the PC argument first, then rename and expose
> the function, then the gdb patch to use the interface.

OK, in V2, there are three patches.  Patch #1 remove the PC argument,
patch #2 exposes and renames disas_aarch64_insn, and patch #3 use it

>> >+/* Decode INSN and fill in *INST the instruction information.  Return zero
>> >+   on success.  */
>> >+
>> >+int disas_aarch64_insn (uint32_t insn, aarch64_inst *inst);
> The prototype should drop the formal argument names, irrespective of
> which .h file it lands in.

Fixed in V2.

*** BLURB HERE ***

Yao Qi (3):
  [aarch64] Remove argument pc from disas_aarch64_insn
  [aarch64] expose disas_aarch64_insn and rename it to
  [aarch64] use aarch64_decode_insn to decode instructions in GDB

 gdb/aarch64-tdep.c       | 29 ++++++++++++++++++-----------
 include/opcode/aarch64.h |  3 +++
 opcodes/aarch64-dis.c    | 10 +++++-----
 3 files changed, 26 insertions(+), 16 deletions(-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]