gdb/testsuite: Add compiler options parameter to function_range helper
[deliverable/binutils-gdb.git] / gdb / record-btrace.c
index 619ecde025b9e2b1b3d2cd8aeb06c58e7b88fa29..d3da8527c5c2d5ceda81c2832c817adf1a7619c2 100644 (file)
@@ -718,7 +718,16 @@ btrace_find_line_range (CORE_ADDR pc)
   range = btrace_mk_line_range (symtab, 0, 0);
   for (i = 0; i < nlines - 1; i++)
     {
-      if ((lines[i].pc == pc) && (lines[i].line != 0))
+      /* The test of is_stmt here was added when the is_stmt field was
+        introduced to the 'struct linetable_entry' structure.  This
+        ensured that this loop maintained the same behaviour as before we
+        introduced is_stmt.  That said, it might be that we would be
+        better off not checking is_stmt here, this would lead to us
+        possibly adding more line numbers to the range.  At the time this
+        change was made I was unsure how to test this so chose to go with
+        maintaining the existing experience.  */
+      if ((lines[i].pc == pc) && (lines[i].line != 0)
+         && (lines[i].is_stmt == 1))
        range = btrace_line_range_add (range, lines[i].line);
     }
 
@@ -1958,7 +1967,7 @@ static struct frame_id
 get_thread_current_frame_id (struct thread_info *tp)
 {
   struct frame_id id;
-  int executing;
+  bool executing;
 
   /* Set current thread, which is implicitly used by
      get_current_frame.  */
This page took 0.023579 seconds and 4 git commands to generate.