breakpoints/19546: Fix crash after updating breakpoints
[deliverable/binutils-gdb.git] / gdb / breakpoint.c
index c059861138220639e88013fc45cfce2f36fdc1a7..f99a7ab46dd6b7a13e5a2795917e33be71297966 100644 (file)
@@ -3764,6 +3764,14 @@ create_exception_master_breakpoint (void)
     }
 }
 
+/* Does B have a location spec?  */
+
+static int
+breakpoint_event_location_empty_p (const struct breakpoint *b)
+{
+  return b->location != NULL && event_location_empty_p (b->location);
+}
+
 void
 update_breakpoints_after_exec (void)
 {
@@ -3878,7 +3886,7 @@ update_breakpoints_after_exec (void)
     /* Without a symbolic address, we have little hope of the
        pre-exec() address meaning the same thing in the post-exec()
        a.out.  */
-    if (event_location_empty_p (b->location))
+    if (breakpoint_event_location_empty_p (b))
       {
        delete_breakpoint (b);
        continue;
@@ -13063,7 +13071,7 @@ static void
 bkpt_re_set (struct breakpoint *b)
 {
   /* FIXME: is this still reachable?  */
-  if (event_location_empty_p (b->location))
+  if (breakpoint_event_location_empty_p (b))
     {
       /* Anything without a location can't be re-set.  */
       delete_breakpoint (b);
This page took 0.025774 seconds and 4 git commands to generate.