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: Stan Shebs <stanshebs at earthlink dot net>
- To: gdb at sourceware dot org
- Date: Tue, 12 Jun 2012 16:36:08 -0700
- 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 6/11/12 5:15 PM, 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.
What about add new commands "maintenance agent-breakpoint id
expression" and "maintenance agent-eval-breakpoint id expression"?
Then we can get the agent code for breakpoint or tracepoint directly.
I could see something like that being useful - instead of breakpoint id
I would suggest having it take a linespec, so you don't have to create a
tracepoint just to see what the bytecodes would be. Also, an optional
hyphen-argument like "-at <linespec>" would save defining new
maintenance subcommands.
One caveat though - not all collect actions translate into agent
expressions, so the user could be misled into thinking that the target
was running bytecode instead of doing direct collection. (This
distinction confused me at least once a while back - the bug was in
non-agent collect action.)
Stan
stan@codesourcery.com