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: [RFC] mi: add -a option to the "-data-disassemble" command


> From: Jan Vrany <jan.vrany@fit.cvut.cz>
> Cc: Jan Vrany <jan.vrany@fit.cvut.cz>
> Date: Tue, 14 Aug 2018 10:15:43 +0100
> 
> A CLI command "disassemble" allows use to specify a single
> address - in that case function surrounding that address is
> disassembled.
> 
> This commit adds this feature to MI command "-data-disassemble".

Thanks.

>  *** Changes since GDB 8.2
>  
> +* The '-data-disassemble' MI command now accepts the '-a' option to disassemble
> +  the whole function surrounding given program counter value or function name.

This is OK, but please make the lines shorter by a couple of
characters.

> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -31208,6 +31208,7 @@ For details about what an addressable memory unit is,
>  @smallexample
>   -data-disassemble
>      [ -s @var{start-addr} -e @var{end-addr} ]
> +  | [ -a @var{addr} ]
>    | [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ]
>    -- @var{mode}
>  @end smallexample
> @@ -31220,6 +31221,11 @@ Where:
>  is the beginning address (or @code{$pc})
>  @item @var{end-addr}
>  is the end address
> +@item @var{addr}
> +is the address anywhere in function code (or function name).  If @code{-a}
> +@var{addr} is used, the whole function surrounding that address will be

This separates -a and ADDR, which can confuse the reader.  Suggest to
reword:

  @item @var{addr}
  is either the name of a function, or an address anywhere in
  function's code.  If @code{-a} followed by an @var{addr} is used,
  the specified function will be disassembled

> +disassembled. If @var{addr} is a function name, the whole function with that
> +name will be disassembled.

The last sentence can be dropped if you agree with my rewording, as it
is now redundant.

The documentation parts are OK with the above fixed.


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