This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] add -s option to make -break-insert support dprintf


> Date: Thu, 28 Mar 2013 22:21:30 +0800
> From: Hui Zhu <hui_zhu@mentor.com>
> CC: Marc Khouzam <marc.khouzam@ericsson.com>, Eli Zaretskii <eliz@gnu.org>
> 
> This is the patches to add -s flags to make -break-info support dprintf.
> mi-dprintf.txt is for the code.
> mi-dprintf-doc.txt is for the doc.
> mi-dprintf-test.txt is for the test.
> 
> After this patch, you can use -s option to add dprintf.  To see mi-dprintf-doc.txt to get info about how to use this function.

Thanks.

> This is for NEWS:
>    ** The -s of MI command -break-insert can set a dynamic printf.

 "The new option -s of the MI command -break-insert sets a dynamic
  printf breakpoint."

> 2013-03-28  Hui Zhu  <hui@codesourcery.com>
> 
> 	* gdb.texinfo (GDB/MI Breakpoint Commands): Add "-s".
                                                    ^^^^^^^^
"Describe the -s option."

> --- a/doc/gdb.texinfo
> +++ b/doc/gdb.texinfo
> @@ -28784,7 +28784,9 @@ N.A.
>  @smallexample
>   -break-insert [ -t ] [ -h ] [ -f ] [ -d ] [ -a ]
>      [ -c @var{condition} ] [ -i @var{ignore-count} ]
> -    [ -p @var{thread-id} ] [ @var{location} ]
> +    [ -p @var{thread-id} ]
> +    [ -s "@var{template},@var{expression}[,@var{expression}@dots{}]" ]
> +    [ @var{location} ]
>  @end smallexample
>  
>  @noindent
> @@ -28824,6 +28826,29 @@ Make the breakpoint conditional on @var{
>  Initialize the @var{ignore-count}.
>  @item -p @var{thread-id}
>  Restrict the breakpoint to the specified @var{thread-id}.
> +@item -s "@var{location},@var{template},@var{expression}[,@var{expression}@dots{}]"

The format of the -s argument in @item is different from the format in
the @smallexample above.  Which one is correct?

> +Set a @ref{Dynamic Printf}.

Please don't use @ref as if it were an HTML "<a href" attribute; it is
not.  This produces ugly Info output.  Please use this style instead:

  Set a dynamic printf breakpoint (@pxref{Dynamic Printf}).

or this:

  Set a dynamic printf breakpoint, described in @ref{Dynamic Printf}.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]