diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2009-08-03 12:39:01 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2009-08-03 12:39:01 +0000 |
commit | 48cb2d85819efcb448e7b635e0a5da776f5bfd8c (patch) | |
tree | 48ad67af6be4c92c46688853d2e165cd1e867783 /gdb/doc | |
parent | 3c1179ff511933179e64e854ac7b39c8003d9868 (diff) | |
download | gdb-48cb2d85819efcb448e7b635e0a5da776f5bfd8c.zip gdb-48cb2d85819efcb448e7b635e0a5da776f5bfd8c.tar.gz gdb-48cb2d85819efcb448e7b635e0a5da776f5bfd8c.tar.bz2 |
Implement -break-commands
* breakpoint.c (get_breakpoint, breakpoint_set_commands): New.
(commands_command): Use breakpoint_set_commands.
* breakpoint.h (get_breakpoint, breakpoint_set_commands): Declare.
* mi/mi-cmds.h (mi_cmd_break_commands): New.
* mi/mi-cmds.c: Register -break-commands.
* mi/mi-cmd-break.c (mi_cmd_break_commands, mi_read_next_line)
(mi_command_line_array, mi_command_line_array_cnt)
(mi_command_line_array_ptr): New.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 32 |
2 files changed, 36 insertions, 1 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index dedf3fe..91a5156 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2009-08-03 Vladimir Prus <vladimir@codesourcery.com> + + * gdb.texinfo (GDB/MI Breakpoint Commands): Document + -break-commands. + 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com> * gdb.texinfo (Cell Broadband Engine SPU architecture): Document the diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index fab05fc..f95e307 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -21492,11 +21492,41 @@ line="5",times="0",ignore="3"@}]@} @ignore @subheading The @code{-break-catch} Command @findex -break-catch +@end ignore @subheading The @code{-break-commands} Command @findex -break-commands -@end ignore +@subsubheading Synopsis + +@smallexample + -break-commands @var{number} [ @var{command1} ... @var{commandN} ] +@end smallexample + +Specifies the CLI commands that should be executed when breakpoint +@var{number} is hit. The parameters @var{command1} to @var{commandN} +are the commands. If no command is specified, any previously-set +commands are cleared. @xref{Break Commands}. Typical use of this +functionality is tracing a program, that is, printing of values of +some variables whenever breakpoint is hit and then continuing. + +@subsubheading @value{GDBN} Command + +The corresponding @value{GDBN} command is @samp{commands}. + +@subsubheading Example + +@smallexample +(gdb) +-break-insert main +^done,bkpt=@{number="1",type="breakpoint",disp="keep", +enabled="y",addr="0x000100d0",func="main",file="hello.c", +fullname="/home/foo/hello.c",line="5",times="0"@} +(gdb) +-break-commands 1 "print v" "continue" +^done +(gdb) +@end smallexample @subheading The @code{-break-condition} Command @findex -break-condition |