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 3/5] Look for the last matched 'V' block in trace frame


>>>>> "Yao" == Yao Qi <yao@codesourcery.com> writes:

Yao> 2013-03-07  Yao Qi  <yao@codesourcery.com>
Yao> 	* tracepoint.c (traceframe_read_tsv): Look for the last matched
Yao> 	'V' block in trace frame.

Yao> @@ -5248,7 +5250,7 @@ traceframe_read_tsv (int tsvnum, LONGEST *val)
Yao>        if (tsvnum == vnum)
Yao>  	{
Yao>  	  memcpy (val, dataptr, sizeof (*val));
Yao> -	  return 0;
Yao> +	  found = 1;
Yao>  	}
[...]
Yao>    trace_debug ("traceframe %d has no data for variable %d",
Yao>  	       tfnum, tsvnum);
Yao> -  return 1;
Yao> +  return !found;

I think the logic change here is fine, but it invalidates the
trace_debug just before the return.

I think this needs to be:

if (!found)
  trace_debug (...);


The patch is ok with that fix.

Tom


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