This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH v2 2/4] disasm: add struct disasm_insn to describe to-be-disassembled instruction
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Doug Evans <xdje42 at gmail dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "palves at redhat dot com" <palves at redhat dot com>
- Date: Mon, 26 Oct 2015 07:52:59 +0000
- Subject: RE: [PATCH v2 2/4] disasm: add struct disasm_insn to describe to-be-disassembled instruction
- Authentication-results: sourceware.org; auth=none
- References: <1445246610-11645-1-git-send-email-markus dot t dot metzger at intel dot com> <1445246610-11645-3-git-send-email-markus dot t dot metzger at intel dot com> <8637wyege1 dot fsf at sspiff dot org>
> -----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