diff options
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r-- | gdb/linux-thread-db.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index f7f0d38..0669750 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -611,14 +611,13 @@ enable_thread_event_reporting (void) static int thread_db_find_new_threads_silently (ptid_t ptid) { - volatile struct gdb_exception except; - TRY_CATCH (except, RETURN_MASK_ERROR) + TRY { thread_db_find_new_threads_2 (ptid, 1); } - if (except.reason < 0) + CATCH (except, RETURN_MASK_ERROR) { if (libthread_db_debug) exception_fprintf (gdb_stdlog, except, @@ -648,6 +647,8 @@ thread_db_find_new_threads_silently (ptid_t ptid) return 1; } } + END_CATCH + return 0; } @@ -1681,7 +1682,6 @@ static int find_new_threads_once (struct thread_db_info *info, int iteration, td_err_e *errp) { - volatile struct gdb_exception except; struct callback_data data; td_err_e err = TD_ERR; @@ -1691,7 +1691,7 @@ find_new_threads_once (struct thread_db_info *info, int iteration, /* See comment in thread_db_update_thread_list. */ gdb_assert (!target_has_execution || thread_db_use_events ()); - TRY_CATCH (except, RETURN_MASK_ERROR) + TRY { /* Iterate over all user-space threads to discover new threads. */ err = info->td_ta_thr_iter_p (info->thread_agent, @@ -1705,9 +1705,12 @@ find_new_threads_once (struct thread_db_info *info, int iteration, if (libthread_db_debug) { - if (except.reason < 0) - exception_fprintf (gdb_stdlog, except, - "Warning: find_new_threads_once: "); + CATCH (except, RETURN_MASK_ERROR) + { + exception_fprintf (gdb_stdlog, except, + "Warning: find_new_threads_once: "); + } + END_CATCH fprintf_unfiltered (gdb_stdlog, _("Found %d new threads in iteration %d.\n"), |