* config/obj-aout.h: Fix comment typos.
[deliverable/binutils-gdb.git] / gdb / breakpoint.c
index 86d9f17423217a1248aad946465ccefce198f8bd..02874bcf290d66ea755791d1a2ef81685937bf91 100644 (file)
@@ -1071,7 +1071,11 @@ insert_bp_location (struct bp_location *bpt,
        bpt->owner->enable_state = bp_disabled;
       else
        bpt->inserted = 1;
-      return val;
+
+      /* We've already printed an error message if there was a problem
+        inserting this catchpoint, and we've disabled the catchpoint,
+        so just return success.  */
+      return 0;
     }
 
   return 0;
@@ -4293,11 +4297,12 @@ re_enable_breakpoints_in_shlibs (void)
   ALL_BREAKPOINTS (b)
     if (b->enable_state == bp_shlib_disabled)
     {
-      char buf[1];
+      char buf[1], *lib;
 
       /* Do not reenable the breakpoint if the shared library
          is still not mapped in.  */
-      if (target_read_memory (b->loc->address, buf, 1) == 0)
+      lib = PC_SOLIB (b->loc->address);
+      if (lib != NULL && target_read_memory (b->loc->address, buf, 1) == 0)
        b->enable_state = bp_enabled;
     }
 }
This page took 0.024181 seconds and 4 git commands to generate.