This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch v6 21/21] record-btrace: add (reverse-)stepping support


On Fri, 20 Sep 2013 13:30:39 +0200, Markus Metzger wrote:
[...]
> --- a/gdb/btrace.h
> +++ b/gdb/btrace.h
> @@ -153,6 +153,25 @@ struct btrace_call_history
>    struct btrace_call_iterator end;
>  };
>  
> +/* Branch trace thread flags.  */
> +enum btrace_thread_flag
> +{
> +    /* The thread is to be stepped forwards.  */
> +    BTHR_STEP = (1 << 0),
> +
> +    /* The thread is to be stepped backwards.  */
> +    BTHR_RSTEP = (1 << 1),
> +
> +    /* The thread is to be continued forwards.  */
> +    BTHR_CONT = (1 << 2),
> +
> +    /* The thread is to be continued backwards.  */
> +    BTHR_RCONT = (1 << 3),
> +
> +    /* The thread is to be moved.  */
> +    BTHR_MOVE = (BTHR_STEP | BTHR_RSTEP | BTHR_CONT | BTHR_RCONT)
> +};

The content should be indented by two spaces, not by four.


> +
>  /* Branch trace information per thread.
>  
>     This represents the branch trace configuration as well as the entry point
[...]
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index 1098b60..50e7206 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -6192,8 +6192,8 @@ replay implementation.  This method allows replaying and reverse
>  execution.
>  
>  @item btrace
> -Hardware-supported instruction recording.  This method does not allow
> -replaying and reverse execution.
> +Hardware-supported instruction recording.  This method does not record
> +data.  It allows limited replay and reverse execution.

As discussed in
	Message-ID: <A78C989F6D9628469189715575E55B230A9D4934@IRSMSX104.ger.corp.intel.com>

the documentation should mention the full history is usually not kept as the
btrace buffer commonly overflows.  Otherwise user may be curious why the
btrace history is always relatively short.

I would see it worth a comment even in
	(gdb) help record btrace 
	Start branch trace recording.


>  This recording method may not be available on all processors.
>  @end table


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]