Re: [RFC] Let "gcore" command accept a suffix argument

Stan Shebs
2009-12-16T15:49:47Z

Hui Zhu wrote:
> On Wed, Dec 16, 2009 at 03:20, Tom Tromey <tromey@redhat.com> wrote:
>
>>>>>>> ">" == Hui Zhu <teawater@gmail.com> writes:
>>>>>>>
>>>> Agree with you. Add " with variable make it oddness.
>>>> What about change it to others, like:
>>>> eval echo {++$a}
>>>>
>>>> Or add " to simple string, like:
>>>> eval echo ++$a".core"
>>>> Or
>>>> eval echo ++$a'.core'
>>>>
>> What do you think of the idea of making it printf-like?
>>
>
> It's not bad. But need a lot of extend work that the old patch don't have.
> And this command doesn't need convert a value from 1 type to another.
> So I want use the "" way.
>
BTW, Pedro nudges me out of my stupor and reminds me that the
soon-to-be-posted tracepoint action to evaluate without collecting is
also called "eval" (it was originally proposed as "do" but that
ambiguates with "down", which seemed like a bad idea).

The two versions are not necessarily mutually exclusive - the
downloading at the start of a trace run gives us a chance to filter out
eval's that don't make sense for the target agent - but if we go too
afield on syntax (the tracepoint version is simply a comma-separated
list of GDB expressions), then that's going to be more of a problem to
reconcile.

Stan