This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Move amd64_insn_length to common code
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Doug Evans <dje at google dot com>
- Date: Thu, 6 May 2010 01:23:29 +0100
- Subject: Re: Move amd64_insn_length to common code
- References: <201004301954.22310.pedro@codesourcery.com>
On Friday 30 April 2010 19:54:22, Pedro Alves wrote:
> I'll be posting a patch that adds code to i386-tdep.c
> that will need to know the length of an instruction. We already
> have code for that in amd64-tdep.c. I don't suppose you
> see a problem with moving it to a more common/reusable place?
FYI, I went ahead and applied this. Easy to revert and address
some other way if need be.
> 2010-04-30 Pedro Alves <pedro@codesourcery.com>
>
> gdb/
> * amd64-tdep.c: Include disasm.h.
> (amd64_insn_length_fprintf, amd64_insn_length_init_dis)
> (amd64_insn_length): Moved to disasm.c and renamed.
> (fixup_riprel): Adjust.
> * disasm.c (do_ui_file_delete): New.
> (gdb_insn_length): New.
> (gdb_buffered_insn_length_fprintf)
> (gdb_buffered_insn_length_init_dis)
> (gdb_buffered_insn_length): New, moved from amd64-tdep.c, and
> renamed.
> * disasm.h (gdb_insn_length): Declare.
> (gdb_buffered_insn_length): Declare.
--
Pedro Alves