This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 7/9] compile: New 'compile print'
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org, pmuldoon at redhat dot com
- Date: Mon, 06 Apr 2015 20:41:03 +0300
- Subject: Re: [PATCH v2 7/9] compile: New 'compile print'
- Authentication-results: sourceware.org; auth=none
- References: <20150406172623 dot 31404 dot 58833 dot stgit at host1 dot jankratochvil dot net> <20150406172716 dot 31404 dot 8551 dot stgit at host1 dot jankratochvil dot net>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Phil Muldoon <pmuldoon@redhat.com>
> Date: Mon, 06 Apr 2015 19:27:16 +0200
>
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -53,6 +53,9 @@ record btrace bts
> record bts
> Start branch trace recording using Branch Trace Store (BTS) format.
>
> +compile print
> + Evaluate expression with the compiler and print result.
Perhaps "by using the compiler" or "by compiling and running it"?
Saying "with the compiler" is slightly incorrect here, and might even
be confusing, if some non-native speaker interprets the "with" as
referring to "expression" and not to "evaluate".
> + add_cmd ("print", class_obscure, compile_print_command,
> + _("\
> +Evaluate EXPR with the compiler and print result.\n\
Same here.
> +Alternatively, you can type the expression interactively.\n\
> +You can invoke this mode when no argument is given to the command\n\
> +(i.e., \"compile print\" is typed with nothing after it). An\n\
> +interactive prompt will be shown allowing you to enter multiple\n\
> +lines of source code. Type a line containing \"end\" to indicate\n\
> +the end of the source code.\n\
I suggest to rephrase:
Alternatively, you can type a multiline expression by invoking
this command with no argument. GDB will then prompt for the
expression interactively; type a line containing "end" to
indicate the end of the expression.
> +@table @code
> +@item compile print @var{expr}
> +@itemx compile print /@var{f} @var{expr}
> +Compile @var{expr} with the compiler language found as the current
"Compile and execute", I would think.
The documentation parts are OK with those changes.