This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 05/16] cli, btrace: add btrace cli
> From: markus.t.metzger@intel.com
> Cc: markus.t.metzger@gmail.com, Markus Metzger <markus.t.metzger@intel.com>
> 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:
> - "<n>" set the iterator to the <n>-th block
> - "+[<n>]" advance the iterator by <n> (default: 1)
> - "-[<n>]" advance the iterator by -<n> (default: 1)
> - "<l>-<h>" set the iterator to the <h>'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.