This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH v4] Fix alignment of disassemble /r
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Luis Machado <lgustavo at codesourcery dot com>, Leonardo Boquillon <leonardo dot boquillon at tallertechnologies dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "daniel dot gutson at tallertechnologies dot com" <daniel dot gutson at tallertechnologies dot com>
- Date: Tue, 12 Apr 2016 07:22:42 +0000
- Subject: RE: [PATCH v4] Fix alignment of disassemble /r
- Authentication-results: sourceware.org; auth=none
- References: <1460384185-21574-1-git-send-email-leonardo dot boquillon at tallertechnologies dot com> <570C0703 dot 9060100 at codesourcery dot com>
> -----Original Message-----
> From: Luis Machado [mailto:lgustavo@codesourcery.com]
> Sent: Monday, April 11, 2016 10:20 PM
> To: Leonardo Boquillon <leonardo.boquillon@tallertechnologies.com>; gdb-
> patches@sourceware.org; daniel.gutson@tallertechnologies.com; Metzger,
> Markus T <markus.t.metzger@intel.com>
> Subject: Re: [PATCH v4] Fix alignment of disassemble /r
> > +{
> > + int longest_opcode = 0;
> > + unsigned int insn_checked = 0;
>
> Shouldn't longest_opcode be unsigned int since some of the other
> variables are also being forced to unsigned?
I suggested signed int previously to avoid signed-unsigned conversions
when computing longest_opcode from gdb_insn_length ().
> > + const int current_length = gdb_insn_length(gdbarch, addr);
> > + longest_opcode =
> > + (current_length > longest_opcode) ? current_length : longest_opcode;
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, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928