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 v10 25/28] btrace, gdbserver: read branch trace incrementally


>>>>> "Markus" == Markus Metzger <markus.t.metzger@intel.com> writes:

Hi Markus.

Markus> -VEC (btrace_block_s) *
Markus> -target_read_btrace (struct btrace_target_info *btinfo,
Markus> +enum btrace_error
Markus> +target_read_btrace (VEC (btrace_block_s) **btrace,
Markus> +		    struct btrace_target_info *btinfo,
Markus>  		    enum btrace_read_type type)
Markus>  {
Markus>    struct target_ops *t;
 
Markus>    for (t = current_target.beneath; t != NULL; t = t->beneath)
Markus>      if (t->to_read_btrace != NULL)
Markus> -      return t->to_read_btrace (btinfo, type);
Markus> +      return t->to_read_btrace (btrace, btinfo, type);
 
Markus>    tcomplain ();
Markus> -  return NULL;
Markus> +  return BTRACE_ERR_NOT_SUPPORTED;
Markus>  }

While rebasing my branch I noticed this code.

tcomplain doesn't return, so the final "return" here will never be
executed.

Given the function's history I assume this is no big deal -- just a
small oversight, compounded by the compiler not bothering to tell us
that it knows about this :)

However I wanted to point it out in case you were expecting an error
return here.

If it is not important, then please just ignore it.  I have fixed it on
my branch already.

Tom


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