From: Randolph Chung <randolph@tausq.org>
To: gdb-patches@sources.redhat.com
Cc: brobecker@adacore.com
Subject: Re: [RFC/RFA/hppa] unwind pc in bottom frame using correct register
Date: Sat, 04 Dec 2004 07:51:00 -0000 [thread overview]
Message-ID: <20041204053132.GR6359@tausq.org> (raw)
In-Reply-To: <20041204042049.GR16491@adacore.com>
> --- hppa-tdep.c 1 Dec 2004 06:54:56 -0000 1.183
> +++ hppa-tdep.c 4 Dec 2004 04:15:30 -0000
> @@ -2185,6 +2185,12 @@ hppa_unwind_dummy_id (struct gdbarch *gd
> static CORE_ADDR
> hppa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
> {
> + /* If unwinding the PC from the sentinel frame, then which register
> + to read depends on the value of the status register. Use
> + hppa_target_read_pc(), it knows where to get the PC. */
> + if (target_has_execution && frame_relative_level (next_frame) < 0)
> + return hppa_target_read_pc (inferior_ptid);
> +
> return frame_unwind_register_signed (next_frame, HPPA_PCOQ_HEAD_REGNUM) & ~3;
> }
this is wrong... perhaps you can do:
if (frame_unwind_register_signed (next_frame, HPPA_FLAG_REGNUM) & 2)
pc = frame_unsigned_register_signed (next_frame, 31);
else
pc = frame_unsigned_register_signed (next_frame, HPPA_PCOQ_HEAD_REGNUM);
pc &= ~3;
return pc;
this should work on corefiles too.....
the bit about HPPA_FLAG_REGNUM seems to be an hpux specific thing. I
think the syscall stub does something special so we try to return r31
instead of pcoqh. I haven't looked at this in detail...
i don't like having two versions of essentially the same function
either; Andrew mentioned in another email that this is a bug, but i
didn't understand if he meant this is a core-gdb bug or a hppa-specific
bug...
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
next prev parent reply other threads:[~2004-12-04 5:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-04 5:31 Joel Brobecker
2004-12-04 7:51 ` Randolph Chung [this message]
2004-12-04 8:46 ` Joel Brobecker
2004-12-04 10:53 ` Randolph Chung
2004-12-04 12:42 ` Mark Kettenis
2004-12-08 4:33 ` Randolph Chung
2004-12-08 8:21 ` Randolph Chung
2004-12-08 22:20 ` Mark Kettenis
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=20041204053132.GR6359@tausq.org \
--to=randolph@tausq.org \
--cc=brobecker@adacore.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