aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-04-27 01:11:10 +0000
committerDaniel Jacobowitz <drow@false.org>2003-04-27 01:11:10 +0000
commit3086aeaed22acb8842edf19a78623790ab8962a3 (patch)
tree684448027aa91d891d0dc82f10a3c0ba9125db96 /gdb/breakpoint.h
parent44c0647d80a5a39151e40f373c72841b940aee64 (diff)
downloadgdb-3086aeaed22acb8842edf19a78623790ab8962a3.zip
gdb-3086aeaed22acb8842edf19a78623790ab8962a3.tar.gz
gdb-3086aeaed22acb8842edf19a78623790ab8962a3.tar.bz2
* breakpoint.h (struct breakpoint_ops): New.
(struct breakpoint): Add ops member. * breakpoint.c (print_bp_stop_message, print_one_breakpoint) (mention): Use new breakpoint ops member. (set_raw_breakpoint): Initialize ops field to NULL. (print_exception_catchpoint, print_one_exception_catchpoint) (print_mention_exception_catchpoint, handle_gnu_v3_exceptions): New. (gnu_v3_exception_catchpoint_ops): New. (catch_exception_command_1): Call handle_gnu_v3_exceptions.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index b2c53fc..86eec4a 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -184,6 +184,24 @@ enum target_hw_bp_type
hw_execute = 3 /* Execute HW breakpoint */
};
+/* This structure is a collection of function pointers that, if available,
+ will be called instead of the performing the default action for this
+ bptype. */
+
+struct breakpoint_ops
+{
+ /* The normal print routine for this breakpoint, called when we
+ hit it. */
+ enum print_stop_action (*print_it) (struct breakpoint *);
+
+ /* Display information about this breakpoint, for "info breakpoints". */
+ void (*print_one) (struct breakpoint *, CORE_ADDR *);
+
+ /* Display information about this breakpoint after setting it (roughly
+ speaking; this is called from "mention"). */
+ void (*print_mention) (struct breakpoint *);
+};
+
/* Note that the ->silent field is not currently used by any commands
(though the code is in there if it was to be, and set_raw_breakpoint
does set it to 0). I implemented it because I thought it would be
@@ -306,6 +324,9 @@ struct breakpoint
char *exec_pathname;
asection *section;
+
+ /* Methods associated with this breakpoint. */
+ struct breakpoint_ops *ops;
};
/* The following stuff is an abstract data type "bpstat" ("breakpoint