summaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmd-break.h
diff options
context:
space:
mode:
authormgherzan <mgherzan>2012-12-12 21:20:11 +0000
committermgherzan <mgherzan>2012-12-12 21:20:11 +0000
commitb91f8a2ea98c4b4cac20600bd1d0312e04869730 (patch)
tree4910fe63e69c328d7568dcf339c116f0f140d267 /gdb/mi/mi-cmd-break.h
parent820ca44126d2dc25a820c3d6e664fecc3b3c7bde (diff)
downloadgdb-b91f8a2ea98c4b4cac20600bd1d0312e04869730.tar.gz
MI: add the -catch-load and -catch-unload commands
They are equivalent to "catch load" and "catch unload" from CLI. Rationale: GUIs might be interested in catching solib load or unload events. 2012-11-16 Mircea Gherzan <mircea.gherzan@intel.com> * Makefile.in (SUBDIR_MI_OBS): Add mi-cmd-catch.o. (SUBDIR_MI_SRCS): Add mi/mi-cmd-catch.c. * breakpoint.c (add_solib_catchpoint): New function that can be used by both CLI and MI, factored out from catch_load_or_unload. (catch_load_or_unload): Strip it down and make it use the new add_solib_catchpoint. * breakpoint.h (add_solib_catchpoint): Declare it. * mi/mi-cmd-break.h: New file. * mi/mi-cmd-break.c: Include mi-cmd-break.h. (setup_breakpoint_reporting): New function used for both catchpoints and breakpoints. (mi_cmd_break_insert): Use setup_breakpoint_reporting. * mi/mi-cmd-catch.c: New file. * mi/mi-cmds.c (mi_cmds): Add the handlers for -catch-load and -catch-unload. * mi/mi-cmds.h: Declare the handlers for -catch-load and -catch-unload.
Diffstat (limited to 'gdb/mi/mi-cmd-break.h')
-rw-r--r--gdb/mi/mi-cmd-break.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/mi/mi-cmd-break.h b/gdb/mi/mi-cmd-break.h
new file mode 100644
index 00000000000..8a46754a12f
--- /dev/null
+++ b/gdb/mi/mi-cmd-break.h
@@ -0,0 +1,30 @@
+/* MI Command Set - breakpoint and watchpoint commands.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+
+ Contributed by Intel Corporation.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef MI_CMD_BREAK_H
+#define MI_CMD_BREAK_H
+
+
+/* Setup the reporting of the insertion of a new breakpoint or
+ catchpoint. */
+struct cleanup *setup_breakpoint_reporting (void);
+
+#endif
+