From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2622 invoked by alias); 19 Feb 2008 19:48:51 -0000 Received: (qmail 2614 invoked by uid 22791); 19 Feb 2008 19:48:51 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Feb 2008 19:48:32 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 848623C363; Tue, 19 Feb 2008 11:48:30 -0800 (PST) Subject: Re: MIPS: Handle manual calls of MIPS16 functions with a call stub From: Michael Snyder To: "Maciej W. Rozycki" Cc: Nigel Stephens , Jim Blandy , Daniel Jacobowitz , gdb-patches@sourceware.org, "Maciej W. Rozycki" In-Reply-To: References: <20080131220315.GC5085@caradoc.them.org> <20080204163929.GA6642@caradoc.them.org> <8f2776cb0802081007v3978bbfbs4c91835ddd8c3885@mail.gmail.com> <8f2776cb0802131254p7fd04ba5lf908414940b7f622@mail.gmail.com> <47B988D5.3060605@mips.com> Content-Type: text/plain Date: Tue, 19 Feb 2008 19:48:00 -0000 Message-Id: <1203450510.19253.167.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2008-02/txt/msg00319.txt.bz2 On Mon, 2008-02-18 at 16:27 +0000, Maciej W. Rozycki wrote: > On Mon, 18 Feb 2008, Nigel Stephens wrote: > > > >> - It's contrary to the DWARF spec for producers to put arch-specific > > >> information in the low bits of the addresses in the line number > > >> table, function and block address ranges, and so on. Existing > > >> toolchains that do this are buggy, but that's life. > > >> > > > > Hmm. The ELF symbol table has an "out of band" mechanism to distinguish > > symbols which refer to different architectural encodings, using the > > architecture-specific bits in the st_info field. But how would you > > represent that in DWARF's object file encoding, noting that the > > "MIPS16-ness" of an undefined symbol is not known at compile time, only > > at final link time. > > As I see it there is really no need to notice the difference of the > MIPS16 mode text references in DWARF records. The architecture already > observes the bit #0 in text references is not a part of the address and is > merely a mode bit. We have, in particular, joint text and data address > space and where a MIPS16 instruction is treated as data, e.g. when > inserting a breakpoint or with self-modifying code the corresponding data > address has its bit #0 clear. Isn't this a lot like Arm/Thumb? How's it handled there?