Red Hat Enterprise Linux 4: Debugging with gdb | ||
---|---|---|
Prev | Appendix E. The GDB Agent Expression Mechanism | Next |
Here is a sketch of a full non-stop debugging cycle, showing how agent expressions fit into the process.
The user selects trace points in the program's code at which GDB should collect data.
The user specifies expressions to evaluate at each trace point. These expressions may denote objects in memory, in which case those objects' contents are recorded as the program runs, or computed values, in which case the values themselves are recorded.
GDB transmits the tracepoints and their associated expressions to the GDB agent, running on the debugging target.
The agent arranges to be notified when a trace point is hit. Note that, on some systems, the target operating system is completely responsible for collecting the data; refer to Section E.5 Tracing on Symmetrix.
When execution on the target reaches a trace point, the agent evaluates the expressions associated with that trace point, and records the resulting values and memory ranges.
Later, when the user selects a given trace event and inspects the objects and expression values recorded, GDB talks to the agent to retrieve recorded data as necessary to meet the user's requests. If the user asks to see an object whose contents have not been recorded, GDB reports an error.