* [rfa] missing frame_register
@ 2003-03-17 19:47 David Carlton
2003-03-17 20:56 ` Keith Seitz
0 siblings, 1 reply; 3+ messages in thread
From: David Carlton @ 2003-03-17 19:47 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrew Cagney
There's a remaining use of get_saved_register in
gdbtk/generic/gdbtk-register.c. This patch attempts to convert it
over, but I might have gotten it wrong: I just copied some similar
conversions from Andrew's earlier patch. All I've done is verified
that this patch allows the file in question to compile; I don't use
gdbtk or run the gdbtk tests, so I don't have any way of checking
whether or not it works.
Andrew, is this OK? I assume it's either obviously okay to commit or
obviously wrong.
David Carlton
carlton@math.stanford.edu
2003-03-17 David Carlton <carlton@math.stanford.edu>
* generic/gdbtk-register.c (get_register): Replace use of
get_saved_register by frame_register.
Index: gdbtk-register.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-register.c,v
retrieving revision 1.15
diff -u -p -r1.15 gdbtk-register.c
--- gdbtk-register.c 12 Feb 2003 00:39:46 -0000 1.15
+++ gdbtk-register.c 17 Mar 2003 19:43:25 -0000
@@ -287,8 +287,11 @@ get_register (int regnum, void *arg)
return;
}
- get_saved_register (raw_buffer, &optim, (CORE_ADDR *) NULL, deprecated_selected_frame,
- regnum, (enum lval_type *) NULL);
+ {
+ int realnum;
+ frame_register (deprecated_selected_frame, regnum, &optim,
+ NULL, NULL, &realnum, raw_buffer);
+ }
if (optim)
{
Tcl_ListObjAppendElement (NULL, result_ptr->obj_ptr,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfa] missing frame_register
2003-03-17 19:47 [rfa] missing frame_register David Carlton
@ 2003-03-17 20:56 ` Keith Seitz
2003-03-17 21:05 ` David Carlton
0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2003-03-17 20:56 UTC (permalink / raw)
To: David Carlton; +Cc: gdb-patches, Andrew Cagney
On Mon, 2003-03-17 at 11:47, David Carlton wrote:
I was hoping not to have to do anything about this until later (let 'em
sweat for a few hours! :v), but I don't believe the below will work:
> + frame_register (deprecated_selected_frame, regnum, &optim,
> + NULL, NULL, &realnum, raw_buffer);
In frame.c:
void
frame_register (struct frame_info *frame, int regnum,
int *optimizedp, enum lval_type *lvalp,
CORE_ADDR *addrp, int *realnump, void *bufferp)
{
/* Require all but BUFFERP to be valid. A NULL BUFFERP indicates
that the value proper does not need to be fetched. */
gdb_assert (optimizedp != NULL);
gdb_assert (lvalp != NULL);
gdb_assert (addrp != NULL);
gdb_assert (realnump != NULL);
/* gdb_assert (bufferp != NULL); */
I have a patch that does work (I think), and I will check it in
momentarily, unless you want to follow through. I've done exactly the
same as you, expect I called frame_reigster with no NULL values. Six of
one, half-dozen of the other, I think.
I'll check mine in if I don't see a commit from you. I appreciate your
thinking of me, urgh, insight!
Keith
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rfa] missing frame_register
2003-03-17 20:56 ` Keith Seitz
@ 2003-03-17 21:05 ` David Carlton
0 siblings, 0 replies; 3+ messages in thread
From: David Carlton @ 2003-03-17 21:05 UTC (permalink / raw)
To: Keith Seitz; +Cc: gdb-patches, Andrew Cagney
On 17 Mar 2003 13:04:05 -0800, Keith Seitz <keiths@redhat.com> said:
> On Mon, 2003-03-17 at 11:47, David Carlton wrote:
> I was hoping not to have to do anything about this until later (let 'em
> sweat for a few hours! :v), but I don't believe the below will work:
>> + frame_register (deprecated_selected_frame, regnum, &optim,
>> + NULL, NULL, &realnum, raw_buffer);
> In frame.c:
> void
> frame_register (struct frame_info *frame, int regnum,
> int *optimizedp, enum lval_type *lvalp,
> CORE_ADDR *addrp, int *realnump, void *bufferp)
> {
> /* Require all but BUFFERP to be valid. A NULL BUFFERP indicates
> that the value proper does not need to be fetched. */
> gdb_assert (optimizedp != NULL);
> gdb_assert (lvalp != NULL);
> gdb_assert (addrp != NULL);
> gdb_assert (realnump != NULL);
> /* gdb_assert (bufferp != NULL); */
Oh. Whoops. I guess I could have done a bit more checking! I guess
I needed a few more dummy variables, or something.
> I have a patch that does work (I think), and I will check it in
> momentarily, unless you want to follow through.
Thanks, be my guest.
> I appreciate your thinking of me, urgh, insight!
Well, I figured I owed insight one after I inadvertently broke it
twice a month or so back.
David Carlton
carlton@math.stanford.edu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-03-17 21:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-17 19:47 [rfa] missing frame_register David Carlton
2003-03-17 20:56 ` Keith Seitz
2003-03-17 21:05 ` David Carlton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox