Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: gdb-patches@sourceware.org
Subject: [patch] Error reporting during insert_breakpoints
Date: Wed, 03 Jun 2009 20:45:00 -0000	[thread overview]
Message-ID: <4A26E026.2000705@vmware.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

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.


[-- Attachment #2: breaks.txt --]
[-- Type: text/plain, Size: 1477 bytes --]

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));

             reply	other threads:[~2009-06-03 20:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 20:45 Michael Snyder [this message]
2009-06-03 21:46 ` Pedro Alves
2009-06-03 22:10   ` Pedro Alves
2009-10-23 15:36   ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A26E026.2000705@vmware.com \
    --to=msnyder@vmware.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox