RE: Another proposal for frontends and queries.

Marc Khouzam
2009-09-16T20:35:08Z

> -----Original Message-----
> From: Tom Tromey [mailto:tromey@redhat.com]
> Sent: Wednesday, September 16, 2009 4:20 PM
> To: Marc Khouzam
> Cc: 'Joel Brobecker'; 'gdb-patches@sourceware.org'
> Subject: Re: Another proposal for frontends and queries.
>
> >>>>> "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.

I gave it a go and I found that yes, when calling an inferior function
PRecord will prompt.

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

I tried:
(gdb) p foo(3)+foo(4)
and got a single query.

Pretty nice.

Marc