diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2010-03-23 21:41:55 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2010-03-23 21:41:55 +0000 |
commit | 6534d786b1826ee9e9742b9ab13b4a614fa648d0 (patch) | |
tree | bd1ffcee35dbb7df7a5788b31a3f0f8b964fcc97 /gdb | |
parent | 51661e93bc86f652d6e6df2fb5663680e33ca4d0 (diff) | |
download | gdb-6534d786b1826ee9e9742b9ab13b4a614fa648d0.zip gdb-6534d786b1826ee9e9742b9ab13b4a614fa648d0.tar.gz gdb-6534d786b1826ee9e9742b9ab13b4a614fa648d0.tar.bz2 |
Implement creating tracepoints with -break-insert.
* mi/mi-cmd-break.c (mi_cmd_break_insert): Handle -a
to mean that tracepoint should be created.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-break.c | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cbc8eb6..dbab388 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2010-03-24 Vladimir Prus <vladimir@codesourcery.com> + Implement creating tracepoints with -break-insert. + + * mi/mi-cmd-break.c (mi_cmd_break_insert): Handle -a + to mean that tracepoint should be created. + +2010-03-24 Vladimir Prus <vladimir@codesourcery.com> + * breakpoint.c (check_no_tracepoint_commands): Use current spelling of 'teval'. diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c index 204565c..3fcd85b 100644 --- a/gdb/mi/mi-cmd-break.c +++ b/gdb/mi/mi-cmd-break.c @@ -74,6 +74,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc) char *condition = NULL; int pending = 0; int enabled = 1; + int tracepoint = 0; struct cleanup *back_to; struct gdb_exception e; @@ -81,7 +82,8 @@ mi_cmd_break_insert (char *command, char **argv, int argc) enum opt { HARDWARE_OPT, TEMP_OPT, CONDITION_OPT, - IGNORE_COUNT_OPT, THREAD_OPT, PENDING_OPT, DISABLE_OPT + IGNORE_COUNT_OPT, THREAD_OPT, PENDING_OPT, DISABLE_OPT, + TRACEPOINT_OPT, }; static struct mi_opt opts[] = { @@ -92,6 +94,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc) {"p", THREAD_OPT, 1}, {"f", PENDING_OPT, 0}, {"d", DISABLE_OPT, 0}, + {"a", TRACEPOINT_OPT, 0}, { 0, 0, 0 } }; @@ -126,6 +129,10 @@ mi_cmd_break_insert (char *command, char **argv, int argc) break; case DISABLE_OPT: enabled = 0; + break; + case TRACEPOINT_OPT: + tracepoint = 1; + break; } } @@ -148,7 +155,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc) mi_can_breakpoint_notify = 1; create_breakpoint (get_current_arch (), address, condition, thread, 0 /* condition and thread are valid. */, - temp_p, hardware, 0 /* traceflag */, + temp_p, hardware, tracepoint, ignore_count, pending ? AUTO_BOOLEAN_TRUE : AUTO_BOOLEAN_FALSE, NULL, 0, enabled); |