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'


On 27/03/15 07:41, Eli Zaretskii wrote:
>> Date: Fri, 27 Mar 2015 08:33:33 +0100
>> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>> Cc: gdb-patches@sourceware.org, pmuldoon@redhat.com
>>
>> On Fri, 27 Mar 2015 08:18:43 +0100, Eli Zaretskii wrote:
>>> 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.
>> FYI there is already "compile code" and "compile file".
> Yes, I know.  But this command is different AFAIU: it doesn't compile
> any code at all.  So prefixing it with "compile" doesn't sound right
> to me.
It does. It repackages the expression typed by the user into compilable form (with a scope, various bits of stack mapping, address translation, etc), send it to the compiler plugin that compiles it. GDB then runs the code in the inferior and captures the evaluated output and type and prints it.

Cheers

Phil


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