Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 12/13] Document "no debug info debugging" improvements
Date: Thu, 13 Jul 2017 15:47:00 -0000	[thread overview]
Message-ID: <831spkibka.fsf@gnu.org> (raw)
In-Reply-To: <1499912370-1842-14-git-send-email-palves@redhat.com> (message	from Pedro Alves on Thu, 13 Jul 2017 03:19:30 +0100)

> From: Pedro Alves <palves@redhat.com>
> Date: Thu, 13 Jul 2017 03:19:30 +0100
> 
> Here's the documentation bits for all the improvements.  The original
> "weak alias functions" paragraph ends up disappearing, because this
> other patch, which I'm considering kind of part of this series, makes the
> alias case Just Work:
>   https://sourceware.org/ml/gdb-patches/2017-07/msg00018.html
> 
> gdb/ChangeLog:
> yyyy-mm-dd  Pedro Alves  <palves@redhat.com>
> 
> 	* NEWS (Safer support for debugging with no debug info): New.
> 
> gdb/doc/ChangeLog:
> yyyy-mm-dd  Pedro Alves  <palves@redhat.com>
> 
> 	* gdb.texinfo (Variables): Document inspecting no-debug-info
> 	variables.
> 	(Symbols): Document inspecting no-debug-info types.
> 	(Calling): Document calling no-debug-info functions.

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.

> +@cindex unknown type
> +Othertimes, information about a variable's type is completely absent
> +from the debug information included in the program.  This most often
> +happens when the program or library where the variable is defined
> +includes no debug information at all.  @value{GDBN} knows the variable
> +exists from inspecting the linker/loader symbol table (e.g., the ELF
> +dynamic symbol table), but such symbols do not contain type
> +information.  If you try to inspect the type of a (global) variable
> +for which @value{GDBN} has no type information, @value{GDBN} says
> +@w{@samp{<data variable, no debug info>}}.  For example:

Same here.


  parent reply	other threads:[~2017-07-13 15:47 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13  2:19 [PATCH 00/13] No-debug-info debugging improvements Pedro Alves
2017-07-13  2:19 ` [PATCH 03/13] Make ptype/whatis print function name of functions with no debug info too Pedro Alves
2017-07-13  2:19 ` [PATCH 04/13] evaluate_subexp_standard: Eliminate one goto Pedro Alves
2017-07-13  2:19 ` [PATCH 02/13] Introduce OP_VAR_MSYM_VALUE Pedro Alves
2017-07-13  2:19 ` [PATCH 08/13] Eliminate UNOP_MEMVAL_TLS Pedro Alves
2017-07-13  2:19 ` [PATCH 07/13] Stop assuming no-debug-info variables have type int Pedro Alves
2017-07-13  2:19 ` [PATCH 01/13] Stop assuming no-debug-info functions return int Pedro Alves
2017-07-13  2:27 ` [PATCH 09/13] Handle "p S::method()::static_var" in the C++ parser Pedro Alves
2017-07-13  2:27 ` [PATCH 06/13] evaluate_subexp_standard: Factor out OP_VAR_VALUE handling Pedro Alves
2017-07-13  2:28 ` [PATCH 12/13] Document "no debug info debugging" improvements Pedro Alves
2017-07-13 11:09   ` [PATCH 13/13] " Pedro Alves
2017-07-13 13:51     ` Pedro Alves
2017-07-13 13:54       ` Pedro Alves
2017-07-13 15:33         ` Pedro Alves
2017-07-13 15:47   ` Eli Zaretskii [this message]
2017-07-13 16:14     ` [PATCH 12/13] " Pedro Alves
2017-07-13  2:28 ` [PATCH 11/13] Make "p S::method() const::static_var" work too Pedro Alves
2017-07-13  2:28 ` [PATCH 05/13] evaluate_subexp_standard: Remove useless assignments Pedro Alves
2017-07-13  2:29 ` [PATCH 10/13] Handle "p 'S::method()::static_var'" (quoted) in symbol lookup Pedro Alves
2017-07-13  2:29 ` [PATCH 12/13] Fix calling prototyped functions via function pointers Pedro Alves

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=831spkibka.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /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