This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: What about add new commands "maintenance agent-breakpoint id expression" and "maintenance agent-eval-breakpoint id expression"
- From: Yao Qi <yao at codesourcery dot com>
- To: Hui Zhu <hui_zhu at mentor dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Tue, 12 Jun 2012 10:02:46 +0800
- Subject: Re: What about add new commands "maintenance agent-breakpoint id expression" and "maintenance agent-eval-breakpoint id expression"
- References: <4FD68A1A.2040600@mentor.com>
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.
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 (éå)