btinfo->insn_history = NULL;
btinfo->call_history = NULL;
btinfo->replay = NULL;
+
+ btinfo->aux_data.clear ();
}
/* Clear the branch trace maintenance histories in BTINFO. */
BTRACE_INSN_RETURN,
/* The instruction is an unconditional jump. */
- BTRACE_INSN_JUMP
+ BTRACE_INSN_JUMP,
+
+ /* The instruction is a pseudo instruction containing auxiliary data. */
+ BTRACE_INSN_AUX
};
/* Instruction flags. */
This represents a single instruction in a branch trace. */
struct btrace_insn
{
- /* The address of this instruction. */
- CORE_ADDR pc;
+ union
+ {
+ /* The address of this instruction. Applies to btrace_insn with
+ iclass == BTRACE_INSN_OTHER or
+ iclass == BTRACE_INSN_CALL or
+ iclass == BTRACE_INSN_RETURN or
+ iclass == BTRACE_INSN_JUMP. */
+ CORE_ADDR pc;
+
+ /* Index into btrace_info::aux_data. Applies to btrace_insn with
+ iclass == BTRACE_INSN_AUX. */
+ uint64_t aux_data_index;
+ };
/* The size of this instruction in bytes. */
gdb_byte size;
function segment i will be at index (i - 1). */
std::vector<btrace_function> functions;
+ /* Optional auxiliary information that is printed in all commands
+ displaying or stepping through the execution history. */
+ std::vector<std::string> aux_data;
+
/* The function level offset. When added to each function's LEVEL,
this normalizes the function levels such that the smallest level
becomes zero. */
GNU/Linux. Process record and replay can be used both when native
debugging, and when remote debugging via @code{gdbserver}.
+When recording an inferior, @value{GDBN} may print auxiliary information
+during stepping commands and commands displaying the execution history.
+
For architecture environments that support process record and replay,
@value{GDBN} provides the following commands: