This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: MIPS: Handle manual calls of MIPS16 functions with a call stub
- From: Daniel Jacobowitz <drow at false dot org>
- To: "Maciej W. Rozycki" <macro at mips dot com>
- Cc: gdb-patches at sourceware dot org, "Maciej W. Rozycki" <macro at linux-mips dot org>
- Date: Fri, 1 Feb 2008 09:18:38 -0500
- Subject: Re: MIPS: Handle manual calls of MIPS16 functions with a call stub
- References: <Pine.LNX.4.61.0801311703570.22816@perivale.mips.com> <20080131220315.GC5085@caradoc.them.org> <Pine.LNX.4.61.0802011009460.14889@perivale.mips.com>
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