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 4/4] compile: New 'compile print'


> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Phil Muldoon <pmuldoon@redhat.com>
> Date: Thu, 26 Mar 2015 21:57:52 +0100
> 
> It is planned the existing GDB command 'print' will be able to evaluate its
> expressions using the compiler.  There will be some option to choose between
> the existing GDB evaluation and the compiler evaluation.  But as an
> intermediate step this patch provides the expression printing feature as a new
> command.
> 
> I can imagine it could be also called 'maintenance compile print' as in the
> future one should be able to use its functionality by the normal 'print'
> command.

I suggest a different name for this command.  Unfortunately, "eval" is
already taken, but perhaps "parse" or "parse-eval"?  Or maybe a new
switch to "print"?  "compile print" sounds awkward and unintuitive to
me.

> +  add_cmd ("print", class_obscure, compile_print_command,
> +	   _("\
> +Evaluate a EXPR with the compiler and print result.\n\

Suggest to drop the "a" part, it just makes this sentence harder to
read.

> +The expression may be specified in one line, e.g.:\n\

"on the same line as the command" sounds more clear to me.

Otherwise, the documentation parts are OK.

Thanks.


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