* How Do I see (Disabled) data?
@ 2003-02-06 18:49 William Trenker
2003-02-06 19:34 ` Jim Blandy
0 siblings, 1 reply; 4+ messages in thread
From: William Trenker @ 2003-02-06 18:49 UTC (permalink / raw)
To: gdb
I've been searching through the gdb docs, and on Google, trying to figure out how to view data where gdb says:
"Attempt to dereference a generic pointer.
Disabling display 29 to avoid infinite recursion."
Hopefully there is some way to see this data and take my chances on an infinite recursion.
Thanks in advance,
Bill
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How Do I see (Disabled) data?
2003-02-06 18:49 How Do I see (Disabled) data? William Trenker
@ 2003-02-06 19:34 ` Jim Blandy
2003-02-06 19:54 ` William Trenker
0 siblings, 1 reply; 4+ messages in thread
From: Jim Blandy @ 2003-02-06 19:34 UTC (permalink / raw)
To: William Trenker; +Cc: gdb
William Trenker <wdtrenker@yahoo.ca> writes:
> I've been searching through the gdb docs, and on Google, trying to figure out how to view data where gdb says:
> "Attempt to dereference a generic pointer.
> Disabling display 29 to avoid infinite recursion."
>
> Hopefully there is some way to see this data and take my chances on an infinite recursion.
Can you show us the exact commands you're using, and the exact output
from GDB?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How Do I see (Disabled) data?
2003-02-06 19:34 ` Jim Blandy
@ 2003-02-06 19:54 ` William Trenker
2003-02-06 23:31 ` Jim Blandy
0 siblings, 1 reply; 4+ messages in thread
From: William Trenker @ 2003-02-06 19:54 UTC (permalink / raw)
To: gdb
On 06 Feb 2003 14:25:59 -0500
Jim Blandy <jimb@redhat.com> wrote:
> Can you show us the exact commands you're using, and the exact output
> from GDB?
The exact gdb commands, below, are actually generated by DDD:
(gdb) graph display buff
(gdb) graph display *buff dependent on 1
(gdb) Attempt to dereference a generic pointer.
Disabling display 2 to avoid infinite recursion.
buff is defined in the code as:
buff = (void *)param->get_string();
I should mention that I've experimented some more since my first message. I got adventurous with gdb's print command and found out I could explicitly cast the variable, like this:
(gdb) print (char*)buff
$1 = 0x8060a40 "Alex"
I think I may have answered my own question -- right?
Thanks again,
Bill
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How Do I see (Disabled) data?
2003-02-06 19:54 ` William Trenker
@ 2003-02-06 23:31 ` Jim Blandy
0 siblings, 0 replies; 4+ messages in thread
From: Jim Blandy @ 2003-02-06 23:31 UTC (permalink / raw)
To: William Trenker; +Cc: gdb
William Trenker <wdtrenker@yahoo.ca> writes:
> On 06 Feb 2003 14:25:59 -0500
> Jim Blandy <jimb@redhat.com> wrote:
>
> > Can you show us the exact commands you're using, and the exact output
> > from GDB?
>
> The exact gdb commands, below, are actually generated by DDD:
>
> (gdb) graph display buff
> (gdb) graph display *buff dependent on 1
> (gdb) Attempt to dereference a generic pointer.
> Disabling display 2 to avoid infinite recursion.
>
> buff is defined in the code as:
> buff = (void *)param->get_string();
>
> I should mention that I've experimented some more since my first message. I got adventurous with gdb's print command and found out I could explicitly cast the variable, like this:
>
> (gdb) print (char*)buff
> $1 = 0x8060a40 "Alex"
>
> I think I may have answered my own question -- right?
Yep. GDB isn't sure how to evaluate *p, when p has type 'void *', so
the 'display' gets an error, and GDB disables it. By casting it, you
effectively tell GDB which type to use to display it.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-02-06 23:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-06 18:49 How Do I see (Disabled) data? William Trenker
2003-02-06 19:34 ` Jim Blandy
2003-02-06 19:54 ` William Trenker
2003-02-06 23:31 ` Jim Blandy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox