This is the mail archive of the gdb@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: What about add new commands "maintenance agent-breakpoint id expression" and "maintenance agent-eval-breakpoint id expression"


On Tue, Jun 12, 2012 at 10:02 AM, Yao Qi <yao@codesourcery.com> wrote:
> On 06/12/2012 08:15 AM, Hui Zhu wrote:
>> Hi guys,
>>
>> The "maintenance agent" and "maintenance agent-eval" are for translate
>> an expression into remote agent bytecode.
>> Both of them got address info from frame. ÂBut when we use tracepoint or
>> breakpoint with agent code, this address is from tracepoint or breakpoint.
>
> Agent expression evaluation makes sense in the context of "current
> scope" or "current frame". ÂWe can't switch to a frame at any arbitrary
> address, because the frame maybe does not exist.
>

What your worry about is line "expr = parse_expression (exp);" cannot
work, right?
It can be change to function "parse_exp_1" to handle this issue.

BTW if agent generate need current scope or current frame, how this
code generate when breakpoint or tracepoint use it? :)

> Any examples that "maint agent" doesn't meet your needs in
> breakpoint/tracepoint? ÂIt works in the following simple case,
>
> (gdb) b main if (unsigned int) main > 1
> (gdb) maintenance agent-eval (unsigned int) main > 1
> Â0 Âconst64 134513662
> Â9 Âzero_ext 32
> Â11 Âconst8 1
> Â13 Âzero_ext 32
> Â15 Âswap
> Â16 Âless_unsigned
> Â17 Âend
>
> --
> Yao (éå)
>
>

It have too much limit.  For example, it will not work when we want
collect an local var inside of a function.

Thanks,
Hui


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