Really fail inserting software breakpoints on read-only regions
[deliverable/binutils-gdb.git] / gdb / breakpoint.c
index bec7f68f06eb1ab917b12a0bb260fa81173b5f6d..44f6f1430700d7c4c6b2d8801d9959ba1c66526d 100644 (file)
@@ -2674,10 +2674,16 @@ insert_bp_location (struct bp_location *bl,
                    }
                }
              else if (bl->loc_type == bp_loc_software_breakpoint
-                      && mr->attrib.mode != MEM_RW)        
-               warning (_("cannot set software breakpoint "
-                          "at readonly address %s"),
-                        paddress (bl->gdbarch, bl->address));
+                      && mr->attrib.mode != MEM_RW)
+               {
+                 fprintf_unfiltered (tmp_error_stream,
+                                     _("Cannot insert breakpoint %d.\n"
+                                       "Cannot set software breakpoint "
+                                       "at read-only address %s\n"),
+                                     bl->owner->number,
+                                     paddress (bl->gdbarch, bl->address));
+                 return 1;
+               }
            }
        }
         
This page took 0.025988 seconds and 4 git commands to generate.