[PATCH] gdb, btrace: Throw an error for empty recordings when replaying starts.

Willgerodt, Felix felix.willgerodt@intel.com
Tue May 17 10:44:23 GMT 2022


Thanks, I just pushed this.

Felix

> -----Original Message-----
> From: Metzger, Markus T <markus.t.metzger@intel.com>
> Sent: Dienstag, 17. Mai 2022 12:26
> To: Tom Tromey <tom@tromey.com>; Willgerodt, Felix via Gdb-patches
> <gdb-patches@sourceware.org>
> Cc: Andrew Burgess <aburgess@redhat.com>; Willgerodt, Felix
> <felix.willgerodt@intel.com>
> Subject: RE: [PATCH] gdb, btrace: Throw an error for empty recordings when
> replaying starts.
> 
> 
> >> Mhm, I don't think there is an actual test I can write to trigger this.
> >> All callers prevent it from happening by checking btinfo->replay.
> >> I am just making it more consistent, as the function already
> >> errors out in the case of just gaps. Another advantage is that this function
> >> doesn't return NULL anymore, which seems better for future callers.
> >
> >I think the patch is still fine, but at the same time it seems like an
> >assert would be just as correct.
> 
> It would.  But the proposed error matches a similar one a few lines below.
> 
> LGTM,
> markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


More information about the Gdb-patches mailing list