From: Andrew Cagney <ac131313@ges.redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/mips, rfc] Don't define FP_REGNUM
Date: Tue, 17 Sep 2002 14:20:00 -0000 [thread overview]
Message-ID: <3D879CB2.7060500@ges.redhat.com> (raw)
In-Reply-To: <20020913221651.GA22958@nevyn.them.org>
[-- Attachment #1: Type: text/plain, Size: 667 bytes --]
Thanks for eyeballing this.
> For the MIPS to work, a custom virtual_frame_pointer() function would be
>> needed. I don't see any point in implementing this, though, as there is
>> no tracepoint target to test it against. Anyway, coments on this aspect
>> of the patch? If not, I'll check it in.
>>
>> [Hmm, need to mention this in the NEWS file. The MIPS $fp will finally
>> behave as specified in the documentation.]
>
>
> Looks good to me. And there may someday be a tracepoint target to
> test it against - I hope to add tracepoints to gdbserver, eventually.
> When that happens I can revisit this.
I've so far checked in the attached...
Andrew
[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1301 bytes --]
2002-09-17 Andrew Cagney <ac131313@redhat.com>
* arch-utils.c (legacy_virtual_frame_pointer): If FP_REGNUM is
invalid, return SP_REGNUM.
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.68
diff -u -r1.68 arch-utils.c
--- arch-utils.c 14 Sep 2002 09:40:36 -0000 1.68
+++ arch-utils.c 17 Sep 2002 21:17:58 -0000
@@ -423,8 +423,19 @@
int *frame_regnum,
LONGEST *frame_offset)
{
- gdb_assert (FP_REGNUM >= 0);
- *frame_regnum = FP_REGNUM;
+ /* FIXME: cagney/2002-09-13: This code is used when identifying the
+ frame pointer of the current PC. It is assuming that a single
+ register and an offset can determine this. I think it should
+ instead generate a byte code expression as that would work better
+ with things like Dwarf2's CFI. */
+ if (FP_REGNUM >= 0 && FP_REGNUM < NUM_REGS)
+ *frame_regnum = FP_REGNUM;
+ else if (SP_REGNUM >= 0 && SP_REGNUM < NUM_REGS)
+ *frame_regnum = SP_REGNUM;
+ else
+ /* Should this be an internal error? I guess so, it is reflecting
+ an architectural limitation in the current design. */
+ internal_error (__FILE__, __LINE__, "No virtual frame pointer available");
*frame_offset = 0;
}
next prev parent reply other threads:[~2002-09-17 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-13 13:16 Andrew Cagney
2002-09-13 15:16 ` Daniel Jacobowitz
2002-09-17 14:20 ` Andrew Cagney [this message]
2002-09-17 16:27 ` Andrew Cagney
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=3D879CB2.7060500@ges.redhat.com \
--to=ac131313@ges.redhat.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.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