* [patch] Error reporting during insert_breakpoints
@ 2009-06-03 20:45 Michael Snyder
2009-06-03 21:46 ` Pedro Alves
0 siblings, 1 reply; 4+ messages in thread
From: Michael Snyder @ 2009-06-03 20:45 UTC (permalink / raw)
To: gdb-patches
[-- 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));
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Error reporting during insert_breakpoints
2009-06-03 20:45 [patch] Error reporting during insert_breakpoints Michael Snyder
@ 2009-06-03 21:46 ` Pedro Alves
2009-06-03 22:10 ` Pedro Alves
2009-10-23 15:36 ` Michael Snyder
0 siblings, 2 replies; 4+ messages in thread
From: Pedro Alves @ 2009-06-03 21:46 UTC (permalink / raw)
To: gdb-patches; +Cc: Michael Snyder
On Wednesday 03 June 2009 21:42:14, Michael Snyder wrote:
> 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.
Yes, please. This silent stop bites me often, when longjmp-resume
breakpoints fail to insert due to glibc pointer mangling...
> 2) insert_bp_locations() generates error text that assumes
> memory breakpoints. Confusing if remote_insert_breakpoints
> is using Z0.
Strictly speaking, Z0 breakpoints *are* supposed to have
memory breakpoints semantics. :-)
@item z0,@var{addr},@var{length}
@itemx Z0,@var{addr},@var{length}
@cindex @samp{z0} packet
@cindex @samp{Z0} packet
Insert (@samp{Z0}) or remove (@samp{z0}) a memory breakpoint at address
@var{addr} of size @var{length}.
> @@ -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));
I'm not objecting to the change, but, honestly, I don't see where
the assumption was, or where it is being removed?
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Error reporting during insert_breakpoints
2009-06-03 21:46 ` Pedro Alves
@ 2009-06-03 22:10 ` Pedro Alves
2009-10-23 15:36 ` Michael Snyder
1 sibling, 0 replies; 4+ messages in thread
From: Pedro Alves @ 2009-06-03 22:10 UTC (permalink / raw)
To: gdb-patches; +Cc: Michael Snyder
On Wednesday 03 June 2009 22:46:44, Pedro Alves wrote:
> > @@ -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));
>
> I'm not objecting to the change, but, honestly, I don't see where
> the assumption was, or where it is being removed?
Oh, silly me. It's the s/accessing/at/. Ignore me there. BTW, since
you're touching this, how about merging all those fprintf calls
into a single call, and wrapping the user visible string in _() for
translation?
--
Pedro Alves
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Error reporting during insert_breakpoints
2009-06-03 21:46 ` Pedro Alves
2009-06-03 22:10 ` Pedro Alves
@ 2009-10-23 15:36 ` Michael Snyder
1 sibling, 0 replies; 4+ messages in thread
From: Michael Snyder @ 2009-10-23 15:36 UTC (permalink / raw)
To: Pedro Alves; +Cc: gdb-patches
Pedro Alves wrote:
> On Wednesday 03 June 2009 21:42:14, Michael Snyder wrote:
>> 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.
>
> Yes, please. This silent stop bites me often, when longjmp-resume
> breakpoints fail to insert due to glibc pointer mangling...
Fell through the cracks, checking in now.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-23 15:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-03 20:45 [patch] Error reporting during insert_breakpoints Michael Snyder
2009-06-03 21:46 ` Pedro Alves
2009-06-03 22:10 ` Pedro Alves
2009-10-23 15:36 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox