This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 12/13] Document "no debug info debugging" improvements


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]