* [RFA] Revise assertion in frame_saved_regs_register_unwind()
@ 2002-08-08 14:06 Kevin Buettner
2002-08-09 8:27 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2002-08-08 14:06 UTC (permalink / raw)
To: gdb-patches
In the course of rewriting mips_get_saved_register(), I found that
that an assertion in blockframe.c was erroneously failing. See
comment in patch for details. Also, note that set_unwind_by_pc()
sets the unwinder to frame_saved_regs_register_unwind() for the
non-generic dummy frame case.
(This patch is a prerequisite for my upcoming mips_get_saved_register()
rewrite.)
Okay to commit?
* blockframe.c (frame_saved_regs_register_unwind): Revise
PC_IN_CALL_DUMMY_ASSERTION to only apply when generic dummy
frames are in use.
Index: blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.34
diff -u -p -r1.34 blockframe.c
--- blockframe.c 24 Jul 2002 14:38:55 -0000 1.34
+++ blockframe.c 8 Aug 2002 20:54:14 -0000
@@ -1410,7 +1410,11 @@ frame_saved_regs_register_unwind (struct
/* There is always a frame at this point. And THIS is the frame
we're interested in. */
gdb_assert (frame != NULL);
- gdb_assert (!PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame));
+ /* If we're using generic dummy frames, we'd better not be in a call
+ dummy. (generic_call_dummy_register_unwind ought to have been called
+ instead.) */
+ gdb_assert (!(USE_GENERIC_DUMMY_FRAMES
+ && PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)));
/* Load the saved_regs register cache. */
if (frame->saved_regs == NULL)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFA] Revise assertion in frame_saved_regs_register_unwind()
2002-08-08 14:06 [RFA] Revise assertion in frame_saved_regs_register_unwind() Kevin Buettner
@ 2002-08-09 8:27 ` Andrew Cagney
2002-08-09 11:29 ` Kevin Buettner
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-08-09 8:27 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
(I lost this one, thought you'd committed it).
> In the course of rewriting mips_get_saved_register(), I found that
> that an assertion in blockframe.c was erroneously failing. See
> comment in patch for details. Also, note that set_unwind_by_pc()
> sets the unwinder to frame_saved_regs_register_unwind() for the
> non-generic dummy frame case.
>
> (This patch is a prerequisite for my upcoming mips_get_saved_register()
> rewrite.)
>
> Okay to commit?
>
> * blockframe.c (frame_saved_regs_register_unwind): Revise
> PC_IN_CALL_DUMMY_ASSERTION to only apply when generic dummy
> frames are in use.
Yes. (Of course all targets should be using generic dummy frames but
until then :-).
thanks
Andrew
> Index: blockframe.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/blockframe.c,v
> retrieving revision 1.34
> diff -u -p -r1.34 blockframe.c
> --- blockframe.c 24 Jul 2002 14:38:55 -0000 1.34
> +++ blockframe.c 8 Aug 2002 20:54:14 -0000
> @@ -1410,7 +1410,11 @@ frame_saved_regs_register_unwind (struct
> /* There is always a frame at this point. And THIS is the frame
> we're interested in. */
> gdb_assert (frame != NULL);
> - gdb_assert (!PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame));
> + /* If we're using generic dummy frames, we'd better not be in a call
> + dummy. (generic_call_dummy_register_unwind ought to have been called
> + instead.) */
> + gdb_assert (!(USE_GENERIC_DUMMY_FRAMES
> + && PC_IN_CALL_DUMMY (frame->pc, frame->frame, frame->frame)));
>
> /* Load the saved_regs register cache. */
> if (frame->saved_regs == NULL)
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Revise assertion in frame_saved_regs_register_unwind()
2002-08-09 8:27 ` Andrew Cagney
@ 2002-08-09 11:29 ` Kevin Buettner
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Buettner @ 2002-08-09 11:29 UTC (permalink / raw)
To: Andrew Cagney, Kevin Buettner; +Cc: gdb-patches
On Aug 9, 11:27am, Andrew Cagney wrote:
> > * blockframe.c (frame_saved_regs_register_unwind): Revise
> > PC_IN_CALL_DUMMY_ASSERTION to only apply when generic dummy
> > frames are in use.
>
> Yes. (Of course all targets should be using generic dummy frames but
> until then :-).
Committed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-08-09 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-08 14:06 [RFA] Revise assertion in frame_saved_regs_register_unwind() Kevin Buettner
2002-08-09 8:27 ` Andrew Cagney
2002-08-09 11:29 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox