From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13871 invoked by alias); 2 Apr 2010 07:05:22 -0000 Received: (qmail 13760 invoked by uid 22791); 2 Apr 2010 07:05:18 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Apr 2010 07:05:11 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0L0800K00M4KWZ00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Fri, 02 Apr 2010 10:05:08 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.124.92.42]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L0800I28MCJUD60@a-mtaout22.012.net.il>; Fri, 02 Apr 2010 10:05:08 +0300 (IDT) Date: Fri, 02 Apr 2010 07:05:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Infer $pc in a file's trace frame In-reply-to: <4BB51AFC.1010303@codesourcery.com> To: Stan Shebs Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83tyruwd0a.fsf@gnu.org> References: <4BB51AFC.1010303@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2010-04/txt/msg00042.txt.bz2 > Date: Thu, 01 Apr 2010 15:15:24 -0700 > From: Stan Shebs > > This patch is a small usability enhancement from trace frames coming > from a trace file; if registers have not been collected, then clear them > all, and guess that $pc must be the same as the tracepoint's address. > This isn't a good idea for either multi-location tracepoints or stepping > frames though, and we want to warn the user about those cases. Thanks. > + @item > + If you do not collect registers at a tracepoint, @value{GDBN} can > + infer that the value of the PC is the address of the tracepoint and > + display that when you are looking at a trace frame for that > + tracepoint. However, this cannot work if the tracepoint has multiple > + locations (for instance if it was set in a function that was inlined), > + or if it has a @code{while-stepping} loop. In those cases > + @value{GDBN} will warn you that it can't infer the PC, and default it > + to zero. Also, @code{tdump} will use the list of collections for the > + tracepoint proper, and not its stepping list, although the values > + displayed will be correct for the stepping frame. Explicit print > + commands will always work correctly. This is okay, but the last two sentences leave so much stuff unexplained that I doubt the reader will be able to understand their meaning, unless she is a tracepoint hacker. At the very least, I think you should: . add cross-references to where `tdump' and `while-stepping' are described . use the same terminology as you do there, and if the terminology is not explained there ("stepping list"? what's that?), introduce it in those places . add an example to show the issues you are describing. Btw, the description of `tdump' has nothing to say about any special behavior in the presence of `while-stepping', whereas the above seems to hint that there's something we should say about that.