Ah that makes sense. Thanks Markus and Simon. You're right, in the end I didn't rely on these commands. Though when I started playing with btrace, it did make me think btrace was broken on my machine and it took me a bit to figure out what's going on. So I think this change can still be valuable to save others the headache :). Let me know what you think, if you think it's valuable I'll send a v2 with the proposed change. Cheers, Stephen On Tue, Jun 8, 2021 at 4:05 PM Metzger, Markus T wrote: > > Hello Stephen, > > >On 2021-04-12 10:01 a.m., Stephen Röttger via Gdb-patches wrote: > >> diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c > >> index b7b3c91f85d..79a6e47a4a6 100644 > >> --- a/gdb/record-btrace.c > >> +++ b/gdb/record-btrace.c > >> @@ -269,7 +269,7 @@ require_btrace_thread (void) > >> Throws an error if there is no thread or no trace. This function never > >> returns NULL. */ > >> > >> -static struct btrace_thread_info * > >> +struct btrace_thread_info * > >> require_btrace (void) > > > >Since the doc is now in the header, write: > > > >/* See record-btrace.h. */ > > > >here. > > > >I'd LGTM this patch, but I'd like Markus (the btrace specialist) to > >give it a look (I think he's away, it will be in a few weeks). > > Those maintenance commands are not intended for users. You'd really only > need them to debug issues with PT decode or recording. My main use-case is > to clear the history, then turn on debugging and logging, and re-decode the > trace. Re-fetching shouldn't hurt but isn't necessary. > > Your patch LGTM (with the comment fixed) but I wonder whether there's > anything to fix, at all. If you end up needing to use those maint commands, > something else may be wrong. > > Regards, > Markus. > > Intel Deutschland GmbH > Registered Address: Am Campeon 10, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, 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