* breakpoint.c (save_breakpoints): Verify whether
authorThiago Jung Bauermann <bauerman@br.ibm.com>
Wed, 13 Apr 2011 18:28:27 +0000 (18:28 +0000)
committerThiago Jung Bauermann <bauerman@br.ibm.com>
Wed, 13 Apr 2011 18:28:27 +0000 (18:28 +0000)
breakpoint_ops.print_recreate is defined before calling it.

gdb/ChangeLog
gdb/breakpoint.c

index c2ab9f2e5b357eb06008aefdbdd1a4be0bc7c63a..994ec96e000ee236091b59171eb39590df3e8e63 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-13  Thiago Jung Bauermann  <bauerman@br.ibm.com>
+
+       * breakpoint.c (save_breakpoints): Verify whether
+       breakpoint_ops.print_recreate is defined before calling it.
+
 2011-04-11  Gary Benson  <gbenson@redhat.com>
 
        Fix failure with --enable-maintainer-mode.
index 235219178a0a1877e277f52da9a48f51662d8b1f..5633f15cd05d03a9167ff48f6ea19cdf5d724b30 100644 (file)
@@ -12337,7 +12337,7 @@ save_breakpoints (char *filename, int from_tty,
     if (filter && !filter (tp))
       continue;
 
-    if (tp->ops != NULL)
+    if (tp->ops != NULL && tp->ops->print_recreate != NULL)
       (tp->ops->print_recreate) (tp, fp);
     else
       {