From: Daniel Jacobowitz <drow@false.org>
To: "Maciej W. Rozycki" <macro@mips.com>
Cc: gdb-patches@sourceware.org, "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: MIPS: Handle manual calls of MIPS16 functions with a call stub
Date: Thu, 31 Jan 2008 22:08:00 -0000 [thread overview]
Message-ID: <20080131220315.GC5085@caradoc.them.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0801311703570.22816@perivale.mips.com>
On Thu, Jan 31, 2008 at 05:57:57PM +0000, Maciej W. Rozycki wrote:
> Hello,
>
> There is a problem with GDB calling some of MIPS16 functions manually.
> It happens when such a function has a call stub (which is needed due to an
> ABI difference when passing floating-point arguments when called from
> standard MIPS code) and DWARF-2 information is available for the function.
> In this case the stub, which is prepended to the function itself, is made
> a part of the function's DWARF-2 subprogram block. The PC range of the
> block is determined by two labels that are put at the beginning and the
> end of the block each. GDB applies the least significant bit (LSB) of the
> start address of a DWARF-2 block to its internal block structure
> associated with a function and uses it to determine whether the function
> is MIPS16 code (when set) or standard MIPS code (if clear).
>
> 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
elsewhere)? Maybe mips_write_pc should use mips_pc_is_mips16; that's
how Thumb works, by always consulting the minimal symbol table to find
out whether an address should be called as MIPS16 or MIPS32.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2008-01-31 22:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 18:14 Maciej W. Rozycki
2008-01-31 22:08 ` Daniel Jacobowitz [this message]
2008-02-01 10:27 ` Maciej W. Rozycki
2008-02-01 14:19 ` Daniel Jacobowitz
2008-02-01 15:34 ` Maciej W. Rozycki
2008-02-01 16:58 ` Daniel Jacobowitz
2008-02-01 17:07 ` Maciej W. Rozycki
2008-02-01 17:15 ` Daniel Jacobowitz
2008-02-04 16:14 ` Maciej W. Rozycki
2008-02-04 16:39 ` Daniel Jacobowitz
2008-02-08 14:23 ` Maciej W. Rozycki
2008-02-08 14:57 ` Daniel Jacobowitz
2008-02-08 18:06 ` Jim Blandy
2008-02-08 18:08 ` Jim Blandy
2008-02-13 18:28 ` Maciej W. Rozycki
2008-02-13 20:54 ` Jim Blandy
2008-02-15 11:36 ` Maciej W. Rozycki
2008-02-18 13:32 ` Nigel Stephens
2008-02-18 16:28 ` Maciej W. Rozycki
2008-02-19 19:48 ` Michael Snyder
2008-02-22 16:38 ` Jim Blandy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080131220315.GC5085@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=macro@linux-mips.org \
--cc=macro@mips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox