aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/mem-break.h
diff options
context:
space:
mode:
authorDon Breazeal <donb@codesourcery.com>2015-05-12 09:52:42 -0700
committerDon Breazeal <donb@codesourcery.com>2015-05-12 09:52:42 -0700
commitddcbc3975fffffdb5bb3bfb05b1f0ef3d67be3ee (patch)
treeef70f3dbf4d36a597ee639900da058be5b2a806f /gdb/gdbserver/mem-break.h
parent89245bc05692aaa107fa2884c032da21682edc72 (diff)
downloadgdb-ddcbc3975fffffdb5bb3bfb05b1f0ef3d67be3ee.zip
gdb-ddcbc3975fffffdb5bb3bfb05b1f0ef3d67be3ee.tar.gz
gdb-ddcbc3975fffffdb5bb3bfb05b1f0ef3d67be3ee.tar.bz2
Clone remote breakpoints
This patch implements gdbserver routines to clone the breakpoint lists of a process, duplicating them for another process. In gdbserver, each process maintains its own independent breakpoint list. When a fork call creates a child, all of the breakpoints currently inserted in the parent process are also inserted in the child process, but there is nothing to describe them in the data structures related to the child. The child must have a breakpoint list describing them so that they can be removed (if detaching) or recognized (if following). Implementation is a mechanical process of just cloning the lists in several new functions in gdbserver/mem-break.c. Tested by building, since none of the new functions are called yet. This was tested with another patch in the series that implements follow-fork. gdb/gdbserver/ChangeLog: * mem-break.c (APPEND_TO_LIST): Define macro. (clone_agent_expr): New function. (clone_one_breakpoint): New function. (clone_all_breakpoints): New function. * mem-break.h: Declare new functions.
Diffstat (limited to 'gdb/gdbserver/mem-break.h')
-rw-r--r--gdb/gdbserver/mem-break.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/gdbserver/mem-break.h b/gdb/gdbserver/mem-break.h
index 8b010c1..b5a3208 100644
--- a/gdb/gdbserver/mem-break.h
+++ b/gdb/gdbserver/mem-break.h
@@ -253,4 +253,10 @@ int insert_memory_breakpoint (struct raw_breakpoint *bp);
int remove_memory_breakpoint (struct raw_breakpoint *bp);
+/* Create a new breakpoint list NEW_BKPT_LIST that is a copy of SRC. */
+
+void clone_all_breakpoints (struct breakpoint **new_bkpt_list,
+ struct raw_breakpoint **new_raw_bkpt_list,
+ const struct breakpoint *src);
+
#endif /* MEM_BREAK_H */