diff options
author | Pedro Alves <palves@redhat.com> | 2010-04-02 01:18:35 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-04-02 01:18:35 +0000 |
commit | 5cea2a26596faf0ea2e67dd9f885543ff638cdd0 (patch) | |
tree | 12de505d9a0453148d23df614a9395a87fb1b798 /gdb/breakpoint.c | |
parent | 9406745256877df5fca7c8b2b672a0da901cb2d2 (diff) | |
download | gdb-5cea2a26596faf0ea2e67dd9f885543ff638cdd0.zip gdb-5cea2a26596faf0ea2e67dd9f885543ff638cdd0.tar.gz gdb-5cea2a26596faf0ea2e67dd9f885543ff638cdd0.tar.bz2 |
* breakpoint.h (struct counted_command_line): Moved definition to
breakpoint.c, and forward declare.
(breakpoint_commands): Declare.
* breakpoint.c (struct counted_command_line): Moved here.
(breakpoint_commands): New.
* tracepoint.c (encode_actions): Use breakpoint_commands.
* remote.c (remote_download_tracepoint): Ditto.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 01ec269..46a50b9 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -222,6 +222,22 @@ static void disable_trace_command (char *, int); static void trace_pass_command (char *, int); +/* A reference-counted struct command_line. This lets multiple + breakpoints share a single command list. */ +struct counted_command_line +{ + /* The reference count. */ + int refc; + + /* The command list. */ + struct command_line *commands; +}; + +struct command_line * +breakpoint_commands (struct breakpoint *b) +{ + return b->commands ? b->commands->commands : NULL; +} /* Flag indicating that a command has proceeded the inferior past the current breakpoint. */ |