From: Jim Blandy <jimb@redhat.com>
To: William Trenker <wdtrenker@yahoo.ca>
Cc: gdb@sources.redhat.com
Subject: Re: How Do I see (Disabled) data?
Date: Thu, 06 Feb 2003 23:31:00 -0000 [thread overview]
Message-ID: <vt2lm0touxj.fsf@zenia.red-bean.com> (raw)
In-Reply-To: <20030206115126.58b8e0fc.wdtrenker@yahoo.ca>
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.
prev parent reply other threads:[~2003-02-06 23:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-06 18:49 William Trenker
2003-02-06 19:34 ` Jim Blandy
2003-02-06 19:54 ` William Trenker
2003-02-06 23:31 ` Jim Blandy [this message]
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=vt2lm0touxj.fsf@zenia.red-bean.com \
--to=jimb@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=wdtrenker@yahoo.ca \
/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