gdb, btrace: Throw an error for empty recordings when replaying starts.
authorFelix Willgerodt <felix.willgerodt@intel.com>
Mon, 9 May 2022 08:12:39 +0000 (10:12 +0200)
committerFelix Willgerodt <felix.willgerodt@intel.com>
Tue, 17 May 2022 10:41:13 +0000 (12:41 +0200)
This makes record_btrace_start_replaying() more consistent, as it already
errors out e.g. on a recording with only gaps.

gdb/record-btrace.c

index 373d82b8b99f671aa27a2d6b3c5956b3add1a055..3f8a69dd04f5cd4b9ddc1f713168d1b617afead2 100644 (file)
@@ -2017,7 +2017,7 @@ record_btrace_start_replaying (struct thread_info *tp)
 
   /* We can't start replaying without trace.  */
   if (btinfo->functions.empty ())
-    return NULL;
+    error (_("No trace."));
 
   /* GDB stores the current frame_id when stepping in order to detects steps
      into subroutines.