From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1030 invoked by alias); 26 Jun 2013 18:35:13 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 1009 invoked by uid 89); 26 Jun 2013 18:35:13 -0000 X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-wg0-f45.google.com (HELO mail-wg0-f45.google.com) (74.125.82.45) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 26 Jun 2013 18:35:12 +0000 Received: by mail-wg0-f45.google.com with SMTP id j13so10615741wgh.0 for ; Wed, 26 Jun 2013 11:35:10 -0700 (PDT) X-Received: by 10.181.13.75 with SMTP id ew11mr3645658wid.2.1372271710260; Wed, 26 Jun 2013 11:35:10 -0700 (PDT) Received: from localhost ([2.26.203.46]) by mx.google.com with ESMTPSA id fs8sm12642528wib.0.2013.06.26.11.35.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 26 Jun 2013 11:35:09 -0700 (PDT) From: Richard Sandiford To: gdb@sourceware.org Mail-Followup-To: gdb@sourceware.org,macro@codesourcery.com, rdsandiford@googlemail.com Cc: macro@codesourcery.com Subject: Is this "gdb disassembler" code still needed? Date: Wed, 26 Jun 2013 18:35:00 -0000 Message-ID: <87d2r83elf.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-06/txt/msg00057.txt.bz2 Hi, opcodes/mips-dis.c has some code marked "For gdb disassembler, ...". (1) For jumps in the standard encoding: /* For gdb disassembler, force odd address on jalx. */ if (info->flavour == bfd_target_unknown_flavour && strcmp (opp->name, "jalx") == 0) info->target |= 1; (2) For MIPS16 branches: if (pcrel && branch && info->flavour == bfd_target_unknown_flavour) /* For gdb disassembler, maintain odd address. */ info->target |= 1; (3) For MIPS16 jumps: if (!jalx && info->flavour == bfd_target_unknown_flavour) /* For gdb disassembler, maintain odd address. */ l |= 1; (4) For microMIPS jumps: /* For gdb disassembler, force odd address on jalx. */ if (info->flavour == bfd_target_unknown_flavour && strcmp (op->name, "jalx") == 0) info->target |= 1; (4) seems like it's doing the opposite of (3), whereas I'd have expected it to do the same. It doesn't like microMIPS has the equivalent of (2). (Hope I'm reading this right.) Do you know if this special handling is still needed? If so, is the current behaviour intentional? Thanks, Richard