From c5867ab65ce98cb27943606d66eee564c60a7d23 Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Tue, 21 May 2013 04:18:55 +0000 Subject: 2013-05-21 Hui Zhu * breakpoint.c (dprintf_breakpoint_ops): Remove its static. * breakpoint.h (dprintf_breakpoint_ops): Add extern. * mi/mi-cmd-break.c (ctype.h): New include. (gdb_obstack.h): New include. (mi_argv_to_format, mi_cmd_break_insert_1): New. (mi_cmd_break_insert): Call mi_cmd_break_insert_1. (mi_cmd_dprintf_insert): New. * mi/mi-cmds.c (mi_cmds): Add "dprintf-insert". * mi/mi-cmds.h (mi_cmd_dprintf_insert): New extern. 2013-05-21 Hui Zhu * gdb.texinfo (GDB/MI Breakpoint Commands): Describe the "-dprintf-insert" command. 2013-05-21 Hui Zhu * gdb.mi/Makefile.in (PROGS): Add "mi-dprintf". * gdb.mi/mi-dprintf.exp, gdb.mi/mi-dprintf.c: New. --- gdb/doc/ChangeLog | 5 ++++ gdb/doc/gdb.texinfo | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) (limited to 'gdb/doc') diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 5222cd8..41e08b8 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2013-05-21 Hui Zhu + + * gdb.texinfo (GDB/MI Breakpoint Commands): Describe the + "-dprintf-insert" command. + 2013-05-17 Doug Evans * gdb.texinfo (Maintenance Commands): Update doc for diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 1907e59..43b0104 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -29789,6 +29789,84 @@ times="0"@}]@} @c (gdb) @end smallexample +@subheading The @code{-dprintf-insert} Command +@findex -dprintf-insert + +@subsubheading Synopsis + +@smallexample + -dprintf-insert [ -t ] [ -f ] [ -d ] + [ -c @var{condition} ] [ -i @var{ignore-count} ] + [ -p @var{thread-id} ] [ @var{location} ] [ @var{format} ] + [ @var{argument} ] +@end smallexample + +@noindent +If specified, @var{location}, can be one of: + +@itemize @bullet +@item @var{function} +@c @item +offset +@c @item -offset +@c @item @var{linenum} +@item @var{filename}:@var{linenum} +@item @var{filename}:function +@item *@var{address} +@end itemize + +The possible optional parameters of this command are: + +@table @samp +@item -t +Insert a temporary breakpoint. +@item -f +If @var{location} cannot be parsed (for example, if it +refers to unknown files or functions), create a pending +breakpoint. Without this flag, @value{GDBN} will report +an error, and won't create a breakpoint, if @var{location} +cannot be parsed. +@item -d +Create a disabled breakpoint. +@item -c @var{condition} +Make the breakpoint conditional on @var{condition}. +@item -i @var{ignore-count} +Set the ignore count of the breakpoint (@pxref{Conditions, ignore count}) +to @var{ignore-count}. +@item -p @var{thread-id} +Restrict the breakpoint to the specified @var{thread-id}. +@end table + +@subsubheading Result + +@xref{GDB/MI Breakpoint Information}, for details on the format of the +resulting breakpoint. + +@c An out-of-band breakpoint instead of part of the result? + +@subsubheading @value{GDBN} Command + +The corresponding @value{GDBN} command is @samp{dprintf}. + +@subsubheading Example + +@smallexample +(gdb) +4-dprintf-insert foo "At foo entry\n" +4^done,bkpt=@{number="1",type="dprintf",disp="keep",enabled="y", +addr="0x000000000040061b",func="foo",file="mi-dprintf.c", +fullname="mi-dprintf.c",line="25",thread-groups=["i1"], +times="0",script=@{"printf \"At foo entry\\n\"","continue"@}, +original-location="foo"@} +(gdb) +5-dprintf-insert 26 "arg=%d, g=%d\n" arg g +5^done,bkpt=@{number="2",type="dprintf",disp="keep",enabled="y", +addr="0x000000000040062a",func="foo",file="mi-dprintf.c", +fullname="mi-dprintf.c",line="26",thread-groups=["i1"], +times="0",script=@{"printf \"arg=%d, g=%d\\n\", arg, g","continue"@}, +original-location="mi-dprintf.c:26"@} +(gdb) +@end smallexample + @subheading The @code{-break-list} Command @findex -break-list -- cgit v1.1