aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAleksandar Ristovski <aristovski@qnx.com>2008-05-28 14:04:21 +0000
committerAleksandar Ristovski <aristovski@qnx.com>2008-05-28 14:04:21 +0000
commitade927173665c1982d14623d3baccc7415e54597 (patch)
tree87f11a1ca5478e02b44c62a5fafcb75498d4ac6c /gdb
parentf7f9ae2c16fc3c4b620beee844aec2562ea71ab4 (diff)
downloadbinutils-ade927173665c1982d14623d3baccc7415e54597.zip
binutils-ade927173665c1982d14623d3baccc7415e54597.tar.gz
binutils-ade927173665c1982d14623d3baccc7415e54597.tar.bz2
* breakpoint.c (print_exception_catchpoint): In CLI add 'Temporary' for
temporary catchpoints. In MI add missing fields 'reason', 'disp', 'bkptno'. (print_mention_exception_catchpoint): Add 'Temporary' for temporary catchpoints. (handle_gnu_v3_exceptions): Use tempflag.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/breakpoint.c46
2 files changed, 43 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dfe0321..b32c75e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2008-05-28 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * breakpoint.c (print_exception_catchpoint): In CLI add 'Temporary' for
+ temporary catchpoints. In MI add missing fields 'reason', 'disp',
+ 'bkptno'.
+ (print_mention_exception_catchpoint): Add 'Temporary' for temporary
+ catchpoints.
+ (handle_gnu_v3_exceptions): Use tempflag.
+
2008-05-28 Vladimir Prus <vladimir@codesourcery.com>
Refactor varobj_update interface.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 1e7f361..cf2399d 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -6495,15 +6495,31 @@ catch_unload_command_1 (char *arg, int tempflag, int from_tty)
static enum print_stop_action
print_exception_catchpoint (struct breakpoint *b)
{
- annotate_catchpoint (b->number);
+ int bp_temp, bp_throw;
- if (strstr (b->addr_string, "throw") != NULL)
- printf_filtered (_("\nCatchpoint %d (exception thrown)\n"),
- b->number);
- else
- printf_filtered (_("\nCatchpoint %d (exception caught)\n"),
- b->number);
+ annotate_catchpoint (b->number);
+ bp_throw = strstr (b->addr_string, "throw") != NULL;
+ if (b->loc->address != b->loc->requested_address)
+ breakpoint_adjustment_warning (b->loc->requested_address,
+ b->loc->address,
+ b->number, 1);
+ bp_temp = b->loc->owner->disposition == disp_del;
+ ui_out_text (uiout,
+ bp_temp ? "Temporary catchpoint "
+ : "Catchpoint ");
+ if (!ui_out_is_mi_like_p (uiout))
+ ui_out_field_int (uiout, "bkptno", b->number);
+ ui_out_text (uiout,
+ bp_throw ? " (thrown), "
+ : " (caught), ");
+ if (ui_out_is_mi_like_p (uiout))
+ {
+ ui_out_field_string (uiout, "reason",
+ async_reason_lookup (EXEC_ASYNC_BREAKPOINT_HIT));
+ ui_out_field_string (uiout, "disp", bpdisp_text (b->disposition));
+ ui_out_field_int (uiout, "bkptno", b->number);
+ }
return PRINT_SRC_AND_LOC;
}
@@ -6530,10 +6546,16 @@ print_one_exception_catchpoint (struct breakpoint *b, CORE_ADDR *last_addr)
static void
print_mention_exception_catchpoint (struct breakpoint *b)
{
- if (strstr (b->addr_string, "throw") != NULL)
- printf_filtered (_("Catchpoint %d (throw)"), b->number);
- else
- printf_filtered (_("Catchpoint %d (catch)"), b->number);
+ int bp_temp;
+ int bp_throw;
+
+ bp_temp = b->loc->owner->disposition == disp_del;
+ bp_throw = strstr (b->addr_string, "throw") != NULL;
+ ui_out_text (uiout, bp_temp ? _("Temporary catchpoint ")
+ : _("Catchpoint "));
+ ui_out_field_int (uiout, "bkptno", b->number);
+ ui_out_text (uiout, bp_throw ? _(" (throw)")
+ : _(" (catch)"));
}
static struct breakpoint_ops gnu_v3_exception_catchpoint_ops = {
@@ -6555,7 +6577,7 @@ handle_gnu_v3_exceptions (int tempflag, char *cond_string,
break_command_really (trigger_func_name, cond_string, -1,
0 /* condition and thread are valid. */,
- 0, 0,
+ tempflag, 0,
0,
AUTO_BOOLEAN_TRUE /* pending */,
&gnu_v3_exception_catchpoint_ops, from_tty);