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] Introduce the "with" command


I quickly read the patch, and played a little bit with it

2 minor comments below.

Only one (minor) strange behaviour: 'out of range' encountered in
the below 'nested' case:
  (gdb) w print repeats unlimited -- w print repeats 1 -- p "1223334444"
  $18 = "1", '2' <repeats 2 times>, '3' <repeats 3 times>, '4' <repeats 4 times>
  integer 4294967295 out of range

with set thank-you on -- echo It looks really nice :)

Philippe


On Fri, 2019-06-14 at 20:37 +0100, Pedro Alves wrote:
> 	* printcmd.c: Include "top.h", "cli/cli-decode.h", and
> 	"cli/cli-setshow.h".
> 	(with_command, with_command_completer): New.
> 	(_initialize_printcmd): Install the "with" command and its "w"
> 	alias.
It is slightly unexpected to have the with_command in the printcmd.c
file, but I found no real good alternate place, as cli-setshow.c
does not define any command, it just provides support to the "set"
and "show" commands.


> diff --git a/gdb/printcmd.c b/gdb/printcmd.c
....
with_command_completer is not mentioned in valprint.h,
and can be static I think.
> +/* See valprint.h.  */
> +
> +void
> +with_command_completer (struct cmd_list_element *ignore,
> +			completion_tracker &tracker,
> +			const char *text, const char * /*word*/)



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