summaryrefslogtreecommitdiffstats
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-01-16 17:27:53 +0000
committerTom Tromey <tromey@redhat.com>2013-01-16 17:27:53 +0000
commit8ac3646fbbb5f1e0442caa55559513d593136f8c (patch)
tree7586394b88b34a9a36959aef9cdaf3b75914ebdd /gdb/breakpoint.c
parent5a18e3023970ba2542ebdcbab920acbeabd672ce (diff)
downloadppe42-binutils-8ac3646fbbb5f1e0442caa55559513d593136f8c.tar.gz
ppe42-binutils-8ac3646fbbb5f1e0442caa55559513d593136f8c.zip
* breakpoint.c (print_one_catch_fork, print_one_catch_vfork)
(print_one_catch_solib, print_one_catch_syscall) (print_one_catch_exec, print_one_exception_catchpoint): Emit "catch-type". gdb/doc * gdb.texinfo (GDB/MI Breakpoint Information): Document "catch-type" field. (GDB/MI Catchpoint Commands): Add "catch-type" to examples. gdb/testsuite * gdb.mi/mi-catch-load.exp: Look for "catch-type".
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 4d76fa1be0..bd6ceb89da 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -7529,6 +7529,9 @@ print_one_catch_fork (struct breakpoint *b, struct bp_location **last_loc)
ptid_get_pid (c->forked_inferior_pid));
ui_out_spaces (uiout, 1);
}
+
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "catch-type", "fork");
}
/* Implement the "print_mention" breakpoint_ops method for fork
@@ -7642,6 +7645,9 @@ print_one_catch_vfork (struct breakpoint *b, struct bp_location **last_loc)
ptid_get_pid (c->forked_inferior_pid));
ui_out_spaces (uiout, 1);
}
+
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "catch-type", "vfork");
}
/* Implement the "print_mention" breakpoint_ops method for vfork
@@ -7840,6 +7846,10 @@ print_one_catch_solib (struct breakpoint *b, struct bp_location **locs)
}
ui_out_field_string (uiout, "what", msg);
xfree (msg);
+
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "catch-type",
+ self->is_load ? "load" : "unload");
}
static void
@@ -8251,6 +8261,9 @@ print_one_catch_syscall (struct breakpoint *b,
else
ui_out_field_string (uiout, "what", "<any syscall>");
ui_out_text (uiout, "\" ");
+
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "catch-type", "syscall");
}
/* Implement the "print_mention" breakpoint_ops method for syscall
@@ -8488,6 +8501,9 @@ print_one_catch_exec (struct breakpoint *b, struct bp_location **last_loc)
ui_out_field_string (uiout, "what", c->exec_pathname);
ui_out_text (uiout, "\" ");
}
+
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "catch-type", "exec");
}
static void
@@ -11536,9 +11552,17 @@ print_one_exception_catchpoint (struct breakpoint *b,
if (b->loc)
*last_loc = b->loc;
if (strstr (b->addr_string, "throw") != NULL)
- ui_out_field_string (uiout, "what", "exception throw");
+ {
+ ui_out_field_string (uiout, "what", "exception throw");
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "catch-type", "throw");
+ }
else
- ui_out_field_string (uiout, "what", "exception catch");
+ {
+ ui_out_field_string (uiout, "what", "exception catch");
+ if (ui_out_is_mi_like_p (uiout))
+ ui_out_field_string (uiout, "catch-type", "catch");
+ }
}
static void
OpenPOWER on IntegriCloud