This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 12/13] Document "no debug info debugging" improvements
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 13 Jul 2017 17:14:20 +0100
- Subject: Re: [PATCH 12/13] Document "no debug info debugging" improvements
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 349B2916CA
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 349B2916CA
- References: <1499912370-1842-1-git-send-email-palves@redhat.com> <1499912370-1842-14-git-send-email-palves@redhat.com> <831spkibka.fsf@gnu.org>
On 07/13/2017 04:47 PM, Eli Zaretskii wrote:
> Thanks, this is okay with a minor comment:
>
>> +includes no debug information, @value{GDBN} says @w{@samp{'var' has
>> +unknown type; cast it to its declared type}}. @xref{Symbols, unknown
>> +type}, for more about unknown types. If you cast the variable to its
>> +declared type, @value{GDBN} gets the variable's value using the
>> +cast-to type as the variable's type. For example, in a C program:
>> +
>> +@smallexample
>> + (@value{GDBP}) p var
>> + 'var' has unknown type; cast it to its declared type
>> + (@value{GDBP}) p (float) var
>> + $1 = 3.14
>> +@end smallexample
>
> Since you have an example showing the error message, repeating that in
> the text is redundant. Moreover, it will almost certainly cause an
> overfull hbox. Instead, I would just say
>
> If you try to inspect the type of a (global) variable for which
> @value{GDBN} has no type information, @value{GDBN} displays an error
> message.
>
...
> Same here.
Thanks, good idea. Meanwhile, the v2 of the docs are a bit
different in the "calling functions" part since they describe different
behavior. I'll apply that change to the v2 version, and resend it.
Thanks,
Pedro Alves