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: [PATCH v2 2/4] disasm: add struct disasm_insn to describe to-be-disassembled instruction


> -----Original Message-----
> From: Doug Evans [mailto:xdje42@gmail.com]
> Sent: Sunday, October 25, 2015 11:24 PM
> To: Metzger, Markus T
> Cc: gdb-patches@sourceware.org; palves@redhat.com
> Subject: Re: [PATCH v2 2/4] disasm: add struct disasm_insn to describe to-
> be-disassembled instruction

Hi Doug,

Thanks for your review.


> > +/* Prints the instruction INSN into UIOUT and returns the length of the
> > +   printed instruction in bytes.  */
> > +
> > +extern int gdb_print_insn_tuple (struct gdbarch *gdbarch, struct ui_out
> *uiout,
> 
> Still would rather not have "tuple" in the name here.
> I know gdb_print_insn is taken.
> If one reads their function comments the reader is left thinking
> they print essentially the same thing (which is obviously not true).
> We need to pick names that distinguish them.
> I'm as bad at picking names as anyone, but how about
> using gdb_pretty_print_insn here (leaving gdb_print_insn as is) ?

The "tuple" in the name refers to ui_out/MI.  The function prints the ui_out
tuple for one instruction.

I'm also fine to call it gdb_pretty_print_insn or just dump_insn.

Regards,
Markus.

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Prof. Dr. Hermann Eul
Chairperson of the Supervisory Board: Tiffany Doon Silva
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


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