* [RFA] mips_init_extra_frame_info: Set saved_regs value for SP_REGNUM
@ 2002-08-08 17:24 Kevin Buettner
2002-08-08 21:21 ` Andrew Cagney
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2002-08-08 17:24 UTC (permalink / raw)
To: gdb-patches
This patch fixes the other code path mentioned in earlier mail
so that frame->saved_regs[SP_REGNUM] will be initialized at each
place where saved_regs is initialized.
For background on why this change is needed, see:
http://sources.redhat.com/ml/gdb-patches/2002-08/msg00195.html
Okay to commit?
* mips-tdep.c (mips_init_extra_frame_info): Initialize SP_REGNUM's
saved regs value.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.93
diff -u -p -r1.93 mips-tdep.c
--- mips-tdep.c 8 Aug 2002 23:32:52 -0000 1.93
+++ mips-tdep.c 9 Aug 2002 00:13:05 -0000
@@ -2342,6 +2342,7 @@ mips_init_extra_frame_info (int fromleaf
memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
fci->saved_regs[PC_REGNUM]
= fci->saved_regs[RA_REGNUM];
+ fci->saved_regs[SP_REGNUM] = fci->frame;
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] mips_init_extra_frame_info: Set saved_regs value for SP_REGNUM
2002-08-08 17:24 [RFA] mips_init_extra_frame_info: Set saved_regs value for SP_REGNUM Kevin Buettner
@ 2002-08-08 21:21 ` Andrew Cagney
2002-08-09 13:34 ` Kevin Buettner
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-08-08 21:21 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
> This patch fixes the other code path mentioned in earlier mail
> so that frame->saved_regs[SP_REGNUM] will be initialized at each
> place where saved_regs is initialized.
>
> For background on why this change is needed, see:
>
> http://sources.redhat.com/ml/gdb-patches/2002-08/msg00195.html
>
> Okay to commit?
>
> * mips-tdep.c (mips_init_extra_frame_info): Initialize SP_REGNUM's
> saved regs value.
>
> Index: mips-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/mips-tdep.c,v
> retrieving revision 1.93
> diff -u -p -r1.93 mips-tdep.c
> --- mips-tdep.c 8 Aug 2002 23:32:52 -0000 1.93
> +++ mips-tdep.c 9 Aug 2002 00:13:05 -0000
> @@ -2342,6 +2342,7 @@ mips_init_extra_frame_info (int fromleaf
> memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
> fci->saved_regs[PC_REGNUM]
> = fci->saved_regs[RA_REGNUM];
> + fci->saved_regs[SP_REGNUM] = fci->frame;
> }
> }
Yes, ok. Just add a comment reminding the reader that this is setting
the SP for the previous frame.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] mips_init_extra_frame_info: Set saved_regs value for SP_REGNUM
2002-08-08 21:21 ` Andrew Cagney
@ 2002-08-09 13:34 ` Kevin Buettner
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Buettner @ 2002-08-09 13:34 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
On Aug 9, 12:21am, Andrew Cagney wrote:
> > * mips-tdep.c (mips_init_extra_frame_info): Initialize SP_REGNUM's
> > saved regs value.
> >
> > Index: mips-tdep.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/mips-tdep.c,v
> > retrieving revision 1.93
> > diff -u -p -r1.93 mips-tdep.c
> > --- mips-tdep.c 8 Aug 2002 23:32:52 -0000 1.93
> > +++ mips-tdep.c 9 Aug 2002 00:13:05 -0000
> > @@ -2342,6 +2342,7 @@ mips_init_extra_frame_info (int fromleaf
> > memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
> > fci->saved_regs[PC_REGNUM]
> > = fci->saved_regs[RA_REGNUM];
> > + fci->saved_regs[SP_REGNUM] = fci->frame;
> > }
> > }
>
> Yes, ok. Just add a comment reminding the reader that this is setting
> the SP for the previous frame.
Committed. For the record, here's what went in:
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.94
diff -u -p -r1.94 mips-tdep.c
--- mips-tdep.c 9 Aug 2002 01:42:41 -0000 1.94
+++ mips-tdep.c 9 Aug 2002 20:28:30 -0000
@@ -2342,6 +2351,12 @@ mips_init_extra_frame_info (int fromleaf
memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS);
fci->saved_regs[PC_REGNUM]
= fci->saved_regs[RA_REGNUM];
+ /* Set value of previous frame's stack pointer. Remember that
+ saved_regs[SP_REGNUM] is special in that it contains the
+ value of the stack pointer register. The other saved_regs
+ values are addresses (in the inferior) at which a given
+ register's value may be found. */
+ fci->saved_regs[SP_REGNUM] = fci->frame;
}
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-08-09 20:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-08 17:24 [RFA] mips_init_extra_frame_info: Set saved_regs value for SP_REGNUM Kevin Buettner
2002-08-08 21:21 ` Andrew Cagney
2002-08-09 13:34 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox