From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105134 invoked by alias); 12 Apr 2016 07:23:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 105113 invoked by uid 89); 12 Apr 2016 07:23:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=U*patches, sk:patches, commercial, Tel X-HELO: mga11.intel.com Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Apr 2016 07:23:06 +0000 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 12 Apr 2016 00:23:05 -0700 X-ExtLoop1: 1 Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by fmsmga004.fm.intel.com with ESMTP; 12 Apr 2016 00:23:04 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.87]) by IRSMSX154.ger.corp.intel.com ([169.254.12.173]) with mapi id 14.03.0248.002; Tue, 12 Apr 2016 08:22:43 +0100 From: "Metzger, Markus T" To: Luis Machado , Leonardo Boquillon , "gdb-patches@sourceware.org" , "daniel.gutson@tallertechnologies.com" Subject: RE: [PATCH v4] Fix alignment of disassemble /r Date: Tue, 12 Apr 2016 07:23:00 -0000 Message-ID: References: <1460384185-21574-1-git-send-email-leonardo.boquillon@tallertechnologies.com> <570C0703.9060100@codesourcery.com> In-Reply-To: <570C0703.9060100@codesourcery.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00237.txt.bz2 > -----Original Message----- > From: Luis Machado [mailto:lgustavo@codesourcery.com] > Sent: Monday, April 11, 2016 10:20 PM > To: Leonardo Boquillon ; gdb- > patches@sourceware.org; daniel.gutson@tallertechnologies.com; Metzger, > Markus T > Subject: Re: [PATCH v4] Fix alignment of disassemble /r > > +{ > > + int longest_opcode =3D 0; > > + unsigned int insn_checked =3D 0; >=20 > 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 =3D gdb_insn_length(gdbarch, addr); > > + longest_opcode =3D > > + (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