Re: [PATCH v2 7/9] compile: New 'compile print'

Eli Zaretskii
2015-04-06T17:41:06Z

> 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.