From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7129 invoked by alias); 16 Apr 2014 12:20:55 -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 7113 invoked by uid 89); 16 Apr 2014 12:20:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mail-la0-f44.google.com Received: from mail-la0-f44.google.com (HELO mail-la0-f44.google.com) (209.85.215.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 16 Apr 2014 12:20:51 +0000 Received: by mail-la0-f44.google.com with SMTP id c6so8162228lan.3 for ; Wed, 16 Apr 2014 05:20:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=eJghCE6YVkr4GDSI/kIaCumQ2lQQggDqtVN8CA+ugJ0=; b=IveaZj5hdprNcPUsHNv1H2PPTKLRkWeyfcbWRGvK7KDPdKU3IRNNRhOcyDzC+x8XDh uttRD7X0RmlUYLGHuxLsSuBBixWPbyzIWgFBakuiJfXIDjFIHJTkhbehalqHL9B5Pxbc TQNICi/tRpI1gVfmYiwK/J10rLwlBiPR+gV4dow6tz08iYve3nHmpKLk9S1RmI0OmMxs RkphedaiP8tp0A/9/cE46fB4YYPOTzVRfPt4OSy1mrf6HALG1RuIDRNYRGDKZQDAtpCP ppqMd12yUgqlaG9cpk6336P9hxNC0tiYrw1MOUZleBek+JslMC/Wyzps3KA7yBvQWNZX m7ZA== X-Gm-Message-State: ALoCoQlkMOnxo5bO1dMkFqsAw9SQtsXMxr6WMS2y9YKIB6TJ9ePxe1pvwriNhRqptP/zLvvgOmmg MIME-Version: 1.0 X-Received: by 10.112.209.5 with SMTP id mi5mr2670535lbc.30.1397650847707; Wed, 16 Apr 2014 05:20:47 -0700 (PDT) Received: by 10.112.9.40 with HTTP; Wed, 16 Apr 2014 05:20:47 -0700 (PDT) In-Reply-To: References: Date: Wed, 16 Apr 2014 12:20:00 -0000 Message-ID: Subject: Re: [PATCH] Fix alignment of disassemble /r From: Daniel Gutson To: gdb-patches Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00313.txt.bz2 Ping for maintainer feedback. Thanks, Daniel. On Fri, Apr 11, 2014 at 7:24 PM, Daniel Gutson wrote: > Hi, > > when disassembling in raw mode (/r) in a variable-length insn > architecture (i.e. x86), > the output can be completely messed since no alignment takes place. > > I am aware of the uiout->table stuff, but it seems an overkill since I > should change > the current_uiout when disassembling in this mode (and I didn't find > any actual use of this > machinery at least for x86). > Therefore, I added a hack in the dump_insns when the /r flag is specified. > This clearly isn't the cutiest thing in the world, and I specified a > hardcoded maximum number > of opcode bytes to align (currently 8) though it is easily changeable. > > Please let me know if this approach is OK or I should do something > else. Maybe consider whether > current arch is insn-len variable? > > If this happens to be OK, please commit it for me since I don't have > write access. > > Thanks, > > Daniel. > > > 2014-04-11 Daniel Gutson > > * disasm.c (dump_insns): Added right alignment when showing opcod= es. --=20 Daniel F. Gutson Chief Engineering Officer, SPD San Lorenzo 47, 3rd Floor, Office 5 C=C3=B3rdoba, Argentina Phone: +54 351 4217888 / +54 351 4218211 Skype: dgutson