This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: RFC: [patch] Circunvent GCC/GDB problem with (void*) types
- To: Keith Seitz <keiths at cygnus dot com>
- Subject: Re: RFC: [patch] Circunvent GCC/GDB problem with (void*) types
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Mon, 07 May 2001 13:19:27 -0400
- CC: Insight List <insight at sources dot redhat dot com>
- Organization: Red Hat Canada
- References: <Pine.GSO.4.33.0105071012200.15434-100000@ryobi.cygnus.com>
Keith Seitz wrote:
>
> On Mon, 7 May 2001, Fernando Nasser wrote:
>
> > The (char *) target types would need that trick as they are of
> > TYPE_CODE_INT type (don't ask me why) but have "char" as the type name.
> > However, I saw no reason for disallowing the dereferencing of (char *)
> > either. It looks like a useful feature. If you do not agree, please
> > let me know.
>
> The reason for not dereferencing char*: we always printed the contents of
> the string, so there was no need to dereference it.
>
> But you are right, there really is no overwhelming reason not to allow
> this. (It is, afterall, a UI decision, not a backend one.)
>
The only thing we do have an argument is (void *), which is the fact
that we don't know how to display it. The GDB command line interface
does the same; it prints something like "attempt to dereference a void
pointer".
I don't have any strong opinion about this. So, if people prefer to
disallow dereferencing char* just let me know.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9