This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v10 25/28] btrace, gdbserver: read branch trace incrementally
- From: Tom Tromey <tromey at redhat dot com>
- To: Markus Metzger <markus dot t dot metzger at intel dot com>
- Cc: jan dot kratochvil at redhat dot com, palves at redhat dot com, gdb-patches at sourceware dot org
- Date: Thu, 16 Jan 2014 10:57:23 -0700
- Subject: Re: [PATCH v10 25/28] btrace, gdbserver: read branch trace incrementally
- Authentication-results: sourceware.org; auth=none
- References: <1389686678-9039-1-git-send-email-markus dot t dot metzger at intel dot com> <1389686678-9039-26-git-send-email-markus dot t dot metzger at intel dot com>
>>>>> "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