summaryrefslogtreecommitdiff
path: root/gdb/inf-loop.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-05-05 09:02:59 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-05-05 09:02:59 +0000
commitf4d78e7b27320e6ad94e6293385e997c2581fdb5 (patch)
treebb55479c78dd710d05b27dbdc7ea2c0f8d41bece /gdb/inf-loop.c
parent4c1fb653b703c5912933c8eb418763ebff0a58ae (diff)
downloadgdb-f4d78e7b27320e6ad94e6293385e997c2581fdb5.tar.gz
* inf-loop.c (inferior_event_handler): Call bpstat_do_action,
and catch all exceptions from it. * top.c (command_line_handler_continuation): Don't call bpstat_do_action here.
Diffstat (limited to 'gdb/inf-loop.c')
-rw-r--r--gdb/inf-loop.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c
index 4c61daeb003..4889c6f1176 100644
--- a/gdb/inf-loop.c
+++ b/gdb/inf-loop.c
@@ -43,6 +43,7 @@ void
inferior_event_handler (enum inferior_event_type event_type,
gdb_client_data client_data)
{
+ struct gdb_exception e;
int was_sync = 0;
switch (event_type)
{
@@ -91,6 +92,12 @@ inferior_event_handler (enum inferior_event_type event_type,
was_sync = sync_execution;
async_enable_stdin ();
+ /* If there's an error doing breakpoint commands, we don't
+ want to throw -- continuation might still do something. */
+ TRY_CATCH (e, RETURN_MASK_ALL)
+ {
+ bpstat_do_actions (&stop_bpstat);
+ }
/* If we were doing a multi-step (eg: step n, next n), but it
got interrupted by a breakpoint, still do the pending
continuations. The continuation itself is responsible for