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 v4] Fix alignment of disassemble /r


> -----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


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