From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23709 invoked by alias); 10 May 2012 16:44:54 -0000 Received: (qmail 23687 invoked by uid 22791); 10 May 2012 16:44:51 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_BR,RCVD_IN_HOSTKARMA_NO,RCVD_IN_JMF_BR,RCVD_IN_NIX_SPAM,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; Thu, 10 May 2012 16:44:30 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M3T00500FL7XB00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Thu, 10 May 2012 19:44:29 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M3T0057TFU3VR30@a-mtaout22.012.net.il>; Thu, 10 May 2012 19:44:29 +0300 (IDT) Date: Thu, 10 May 2012 16:44:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 05/16] cli, btrace: add btrace cli In-reply-to: <1336662810-21937-6-git-send-email-markus.t.metzger@intel.com> To: markus.t.metzger@intel.com Cc: gdb-patches@sourceware.org, markus.t.metzger@gmail.com, markus.t.metzger@intel.com Reply-to: Eli Zaretskii Message-id: <83ehqsyola.fsf@gnu.org> References: <1336662810-21937-1-git-send-email-markus.t.metzger@intel.com> <1336662810-21937-6-git-send-email-markus.t.metzger@intel.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: 2012-05/txt/msg00371.txt.bz2 > From: markus.t.metzger@intel.com > Cc: markus.t.metzger@gmail.com, Markus Metzger > Date: Thu, 10 May 2012 17:13:19 +0200 > > Add branch trace commands: > > - "btrace enable/disable" perform the obvious operation > > "" on the current thread. > "all" on each existing thread. > "auto" on each newly created thread. > > Actually, "btrace enable auto" turns on automatic enabling for new threads, > and "btrace disable auto" turns it off, again. > > - "btrace list" prints the blocks that have been traced. > > The output may be configured using modifiers. It prints: > - the block number > /a the begin and end code address of that block > /f the function containing the block > /l the source lines contained in the block > > With the /t modifier, it prints the total number of blocks and exits. > > It accepts an optional range argument specifying the range of blocks to be > listed. If no argument is given, all blocks are listed. > > The block number can be used to print the trace for one particular block or > for a range of blocks. > > - "btrace" prints the branch trace disassembly for the current thread. > > Branch trace is printed block-by-block. Typically, one block at a time is > printed. > > By default, the disassembly for the next block is printed, thus iterating > over the full branch trace. > > The command supports the /m and /r modifiers accepted by the disassemble > command. > > In addition, the command supports the following arguments: > - "" set the iterator to the -th block > - "+[]" advance the iterator by (default: 1) > - "-[]" advance the iterator by - (default: 1) > - "-" set the iterator to the 'th block and > print the blocks in the range in reverse (i.e. original > control flow) order. > > Mixed source and disassembly does not work very well for inlined functions, > a problem that it shares with the disassemble command. Thanks. I'm quite sure we want these new commands documented in the user manual, and mentioned in NEWS.