From: Richard Henderson <rth@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: gdb@sources.redhat.com
Subject: [RFA] fix dwarf2 unwind of pc
Date: Sun, 01 Jun 2003 04:29:00 -0000 [thread overview]
Message-ID: <20030601042745.GA12157@redhat.com> (raw)
In-Reply-To: <3ED96961.2030401@redhat.com>
On Sat, May 31, 2003 at 10:48:01PM -0400, Andrew Cagney wrote:
> The loss of control is likely from a dud return address (used for
> setting the return breakpoint) being computed when the the code is first
> stepped into dummy().
Indeed, a problem with the new dwarf2 unwinder. Neither of the
targets Mark tested have the return address in a register. Ok?
r~
* dwarf2-frame.c (dwarf2_frame_cache): Handle retaddr_column
not overlapping PC_REGNUM.
Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.1
diff -c -p -d -r1.1 dwarf2-frame.c
*** dwarf2-frame.c 31 May 2003 19:18:05 -0000 1.1
--- dwarf2-frame.c 1 Jun 2003 04:26:17 -0000
*************** dwarf2_frame_cache (struct frame_info *n
*** 550,558 ****
cache->reg[regnum] = fs->regs.reg[reg];
}
! /* Stored the location of the return addess. */
! if (fs->retaddr_column < fs->regs.num_regs)
cache->reg[PC_REGNUM] = fs->regs.reg[fs->retaddr_column];
do_cleanups (old_chain);
--- 550,570 ----
cache->reg[regnum] = fs->regs.reg[reg];
}
! /* Store the location of the return addess. If the return address
! column (adjusted) is not the same as gdb's PC_REGNUM, then this
! implies a copy from the ra column register. */
! if (fs->retaddr_column < fs->regs.num_regs
! && fs->regs.reg[fs->retaddr_column].how != REG_UNSAVED)
cache->reg[PC_REGNUM] = fs->regs.reg[fs->retaddr_column];
+ else
+ {
+ reg = DWARF2_REG_TO_REGNUM (fs->retaddr_column);
+ if (reg != PC_REGNUM)
+ {
+ cache->reg[PC_REGNUM].loc.reg = reg;
+ cache->reg[PC_REGNUM].how = REG_SAVED_REG;
+ }
+ }
do_cleanups (old_chain);
next prev parent reply other threads:[~2003-06-01 4:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-01 1:37 tracking "next" failure? Richard Henderson
2003-06-01 2:48 ` Andrew Cagney
2003-06-01 4:29 ` Richard Henderson [this message]
2003-06-01 9:44 ` [RFA] fix dwarf2 unwind of pc 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=20030601042745.GA12157@redhat.com \
--to=rth@redhat.com \
--cc=ac131313@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=rth@twiddle.net \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).