This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

Re: Move amd64_insn_length to common code


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


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