From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7958 invoked by alias); 1 Feb 2008 14:19:04 -0000 Received: (qmail 7946 invoked by uid 22791); 1 Feb 2008 14:19:03 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 01 Feb 2008 14:18:40 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 2A83898218; Fri, 1 Feb 2008 14:18:39 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 1409798217; Fri, 1 Feb 2008 14:18:38 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JKwj0-0007Q4-4j; Fri, 01 Feb 2008 09:18:38 -0500 Date: Fri, 01 Feb 2008 14:19:00 -0000 From: Daniel Jacobowitz To: "Maciej W. Rozycki" Cc: gdb-patches@sourceware.org, "Maciej W. Rozycki" Subject: Re: MIPS: Handle manual calls of MIPS16 functions with a call stub Message-ID: <20080201141838.GB28371@caradoc.them.org> Mail-Followup-To: "Maciej W. Rozycki" , gdb-patches@sourceware.org, "Maciej W. Rozycki" References: <20080131220315.GC5085@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-12-11) 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/msg00009.txt.bz2 On Fri, Feb 01, 2008 at 10:26:54AM +0000, Maciej W. Rozycki wrote: > On Thu, 31 Jan 2008, Daniel Jacobowitz wrote: > > > > The bit in the start address is set in the DWARF-2 record by BFD at the > > > link time based on the STO_MIPS16 annotation of the symbol at the same > > > address in the ELF symbol table. If the start address is the same as the > > > regular entry point of the function, which is the case when no call stub > > > has been generated for the function in question, then the DWARF-2 record > > > gets updated accordingly and the bit is correctly set. However, when the > > > call stub indeed is there, the function's entry point is at a different > > > location, and the stub's entry point point is standard MIPS code and > > > therefore bearing no STO_MIPS16 annotation. In this case the bit in the > > > DWARF-2 record remains clear. > > > > Does this mean the DWARF block describes the MIPS16 parts, but the > > function's minimal symbol points to the call stub, which is > > The other way round -- the minimal symbol points to the actual entry > point, but the stub precedes it and is included in the DWARF-2 block > together with the MIPS16 function body. Here's an example that triggers a > failure in the test suite (generated from gdb.base/call-ar-st.c by GCC > 4.2.2): Then why aren't we calling the instruction at the start of the block, i.e. the stub? In which case not using the MIPS16 convention is correct. I don't see why you'd want to call __fn_stub_print_ten_doubles as a MIPS16 function. -- Daniel Jacobowitz CodeSourcery