This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Error reporting during insert_breakpoints


Two small changes

1) If insert_breakpoints fails during stepping, "keep_going()"
contains a TRY_CATCH block, but does not print the exception error.
If the same thing happens during continue, "catch_errors" reports it.

2) insert_bp_locations() generates error text that assumes
memory breakpoints.  Confusing if remote_insert_breakpoints
is using Z0.

2009-06-03  Michael Snyder  <msnyder@vmware.com>

	* infrun.c (keep_going): If insert_breakpoints fails, 
	print the reason.
	* breakpoint.c (insert_bp_location): Don't assume memory
	breakpoints when printing error message.

Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.384
diff -u -p -r1.384 infrun.c
--- infrun.c	3 Jun 2009 18:50:36 -0000	1.384
+++ infrun.c	3 Jun 2009 20:33:40 -0000
@@ -4247,6 +4247,7 @@ keep_going (struct execution_control_sta
 	    }
 	  if (e.reason < 0)
 	    {
+	      exception_print (gdb_stderr, e);
 	      stop_stepping (ecs);
 	      return;
 	    }
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.401
diff -u -p -r1.401 breakpoint.c
--- breakpoint.c	3 Jun 2009 18:16:43 -0000	1.401
+++ breakpoint.c	3 Jun 2009 20:33:40 -0000
@@ -1223,10 +1223,10 @@ Note: automatically using hardware break
 	      else
 		{
 		  fprintf_unfiltered (tmp_error_stream, 
-				      "Cannot insert breakpoint %d.\n", 
+				      "Cannot insert breakpoint %d", 
 				      bpt->owner->number);
 		  fprintf_filtered (tmp_error_stream, 
-				    "Error accessing memory address ");
+				    " at memory address ");
 		  fputs_filtered (paddress (bpt->address), tmp_error_stream);
 		  fprintf_filtered (tmp_error_stream, ": %s.\n",
 				    safe_strerror (val));

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]