From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31664 invoked by alias); 18 Sep 2013 16:30:13 -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 31646 invoked by uid 89); 18 Sep 2013 16:30:12 -0000 Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Sep 2013 16:30:12 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED autolearn=ham version=3.3.2 X-HELO: mtaout22.012.net.il Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MTB00000XU2G900@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Wed, 18 Sep 2013 19:30:06 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MTB000CQXU64OB0@a-mtaout22.012.net.il>; Wed, 18 Sep 2013 19:30:06 +0300 (IDT) Date: Wed, 18 Sep 2013 16:30:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH+DOC] Print registers not saved in the frame as "", instead of "". In-reply-to: <5239CCB3.605@redhat.com> To: Pedro Alves Cc: aburgess@broadcom.com, gdb-patches@sourceware.org, mark.kettenis@xs4all.nl Reply-to: Eli Zaretskii Message-id: <83zjram6sw.fsf@gnu.org> References: <5200F55E.2050308@broadcom.com> <201308061318.r76DIMdd016369@glazunov.sibelius.xs4all.nl> <5200FECF.7030304@broadcom.com> <201308061541.r76FfYQN022875@glazunov.sibelius.xs4all.nl> <520142D9.4030304@redhat.com> <5208E3C8.7060107@broadcom.com> <5208E938.3080305@redhat.com> <201308122001.r7CK1862007934@glazunov.sibelius.xs4all.nl> <520E7255.7080206@redhat.com> <5211F25A.5070907@broadcom.com> <5228B15F.7060108@redhat.com> <5228B2D8.7060604@broadcom.com> <5237567C.8050406@redhat.com> <5239B2D8.4030403@broadcom.com> <5239CCB3.605@redhat.com> X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00609.txt.bz2 > Date: Wed, 18 Sep 2013 16:54:27 +0100 > From: Pedro Alves > CC: gdb-patches@sourceware.org, Mark Kettenis > > Eli, I've added NEWS and documentation changes to this patch. > Are those OK? Almost. > +* GDB now shows "" when printing values of registers that > + have not been saved in the frame: > + > + (gdb) p $rax $1 = > + (gdb) info registers rax rax Wrong formatting of what GDB prints. > +In some ABIs, some registers may not be preserved, or saved, across > +function calls. It may therefore not be possible for @value{GDBN} to > +know the value a register had before the call (in other words, in a ^ "the" > +outer frame). Values of registers that @value{GDBN} can tell were not > +saved in their stack frames are shown as @w{@samp{}}. > + > +However, if debug or unwind information is missing, @value{GDBN} must > +deduce where registers are saved, from the machine code generated by > +your compiler. If some registers are not saved, or if @value{GDBN} is > +unable to locate the saved registers, the selected stack frame makes > +no difference. I don't understand the significance of the last paragraph. Also, shouldn't we mention optimizations as (the main) reason for registers being unavailable? Thanks.