From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47638 invoked by alias); 13 Jul 2017 15:47:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 47619 invoked by uid 89); 13 Jul 2017 15:47:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:4.82, Moreover X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Jul 2017 15:47:09 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVgKW-0005Rd-Ey for gdb-patches@sourceware.org; Thu, 13 Jul 2017 11:47:07 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVgKW-0005RR-9y; Thu, 13 Jul 2017 11:47:04 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3470 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dVgKV-0007k1-10; Thu, 13 Jul 2017 11:47:04 -0400 Date: Thu, 13 Jul 2017 15:47:00 -0000 Message-Id: <831spkibka.fsf@gnu.org> From: Eli Zaretskii To: Pedro Alves CC: gdb-patches@sourceware.org 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) Subject: Re: [PATCH 12/13] Document "no debug info debugging" improvements Reply-to: Eli Zaretskii References: <1499912370-1842-1-git-send-email-palves@redhat.com> <1499912370-1842-14-git-send-email-palves@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00152.txt.bz2 > From: Pedro Alves > 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 > > * NEWS (Safer support for debugging with no debug info): New. > > gdb/doc/ChangeLog: > yyyy-mm-dd Pedro Alves > > * 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{}}. For example: Same here.