mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
btrace: extend struct btrace_insn
Add the instruction's size as well as a coarse classification to struct btrace_insn. Use the information in ftrace_update_function and ftrace_find_call. 2015-02-09 Markus Metzger <markus.t.metzger@intel.com> * btrace.h (btrace_insn_class): New. (btrace_insn) <size, iclass>: New. * btrace.c (ftrace_find_call): Update parameters. Update users. Use instruction classification. (ftrace_new_return): Update parameters. Update users. (ftrace_update_function): Update parameters. Update users. Use instruction classification. (ftrace_update_insns): Update parameters. Update users. (ftrace_classify_insn): New. (btrace_compute_ftrace_bts): Fill in new btrace_insn fields. Add TRY_CATCH around call to gdb_insn_length.
This commit is contained in:
22
gdb/btrace.h
22
gdb/btrace.h
@ -31,6 +31,22 @@
|
||||
struct thread_info;
|
||||
struct btrace_function;
|
||||
|
||||
/* A coarse instruction classification. */
|
||||
enum btrace_insn_class
|
||||
{
|
||||
/* The instruction is something not listed below. */
|
||||
BTRACE_INSN_OTHER,
|
||||
|
||||
/* The instruction is a function call. */
|
||||
BTRACE_INSN_CALL,
|
||||
|
||||
/* The instruction is a function return. */
|
||||
BTRACE_INSN_RETURN,
|
||||
|
||||
/* The instruction is an unconditional jump. */
|
||||
BTRACE_INSN_JUMP
|
||||
};
|
||||
|
||||
/* A branch trace instruction.
|
||||
|
||||
This represents a single instruction in a branch trace. */
|
||||
@ -38,6 +54,12 @@ struct btrace_insn
|
||||
{
|
||||
/* The address of this instruction. */
|
||||
CORE_ADDR pc;
|
||||
|
||||
/* The size of this instruction in bytes. */
|
||||
gdb_byte size;
|
||||
|
||||
/* The instruction class of this instruction. */
|
||||
enum btrace_insn_class iclass;
|
||||
};
|
||||
|
||||
/* A vector of branch trace instructions. */
|
||||
|
Reference in New Issue
Block a user