Re: Another proposal for frontends and queries.

Michael Snyder
2009-09-17T00:16:16Z

Tom Tromey wrote:
>>>>>> "Marc" == Marc Khouzam <marc.khouzam@ericsson.com> writes:
>
> Marc> Having a switch on a command turns out to be insufficient because
> Marc> there is not a 1-1 mapping between queries and commands. Currently
> Marc> PRecord will query before changing memory, but this will be triggered
> Marc> by any of:
> Marc> -var-assign a 8
> Marc> p a=8
> Marc> set var a=8
> Marc> and others.
>
> I am curious about something here. If you know the answers offhand, I'd
> appreciate it. Otherwise I guess I'll look into it at some later point.
>
> Does the record code also query when making an inferior function call
> from an expression? It seems like it ought to, as such a call might
> modify the inferior's state.

It will, because the set-up for the call will involve changing
the stack pointer register as well as the eip. The register
changes will get a prompt, even if nothing gets written to the stack
(memory).

> Also, if an expression does multiple assignments, are there multiple
> queries or just one? It seems like there should just be one.

At a guess, the first "no" will end it (because it will error out),
but you might have to say "yes" repeatedly. I haven't tried it.