What about add new commands "maintenance agent-breakpoint id expression" and "maintenance agent-eval-breakpoint id expression"

Stan Shebs stanshebs@earthlink.net
Tue Jun 12 23:36:00 GMT 2012


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



More information about the Gdb mailing list