This is the mail archive of the gdb-patches@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]

[RFC stub-side break conditions 0/5] General info


Hi,

This patch series adds support and required machinery to enable breakpoint condition evaluation on the stub's side instead of solely in the host's side.

When the evaluation is done on the stub's side, we eliminate all the useless stub -> GDB trap notifications that happen when the condition is false, potentially improving the speed of debugging on slower connections.

Condition evaluation is achieved through the use of the agent expression machinery that is already in place for GDBServer. We extend the z0/z1 packets to carry additional data. In this case it carries the bytecode expression that should be used for evaluation. Each z0/z1 packet will carry all the conditions for all the locations at an specific address.

If we can't convert an expression into a valid agent expression (due to complex types of host-specific data), then we fallback to evaluating the condition on GDB's side.

A new switch was added to make it possible to choose between gdb/stub evaluation modes: set/show breakpoint condition-evaluation. It defaults to "auto". "auto" means "gdb" whenever the stub can't handle breakpoint condition evaluation or when the expression can't be evaluated by the agent expression machinery. "auto" means "stub" when the remote stub supports evaluating conditions and if the expressions generate valid agent expression bytecodes.

The patch is divided in 5 parts:

Part 1: Documentation bits
Part 2: Protocol and feature changes
Part 3: GDB-specific changes
Part 4: GDBServer tracepoint/agent expression common code cleanup
Part 5: GDBServer breakpoint condition evaluation enablement

Luis
lgustavo@codesourcery.com


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