summaryrefslogtreecommitdiff
path: root/gdb/gdbarch.sh
diff options
context:
space:
mode:
authorStan Shebs <shebs@apple.com>2011-09-27 13:09:33 +0000
committerStan Shebs <shebs@apple.com>2011-09-27 13:09:33 +0000
commitd8d587a112bd89794551db2548f59996a0d43dfc (patch)
treea067f7c1c05306e6ea070857d392f3d192944aee /gdb/gdbarch.sh
parent288eb9a9f8fc4d75476e219ab3830722fddef194 (diff)
downloadgdb-d8d587a112bd89794551db2548f59996a0d43dfc.tar.gz
Add return address collection for tracepoints.
* tracepoint.c (encode_actions_1): Add case for $_ret. (validate_actionline): Check for $_ret. (trace_dump_actions): Ditto. * ax-gdb.h (gen_trace_for_return_address): Declare. * ax-gdb.c: Include arch-utils.h. (gen_trace_for_return_address): New function. (agent_command): Add return address special case. * amd64-tdep.c: Include ax.h and ax-gdb.h. (amd64_gen_return_address): New function. (amd64_init_abi): Call it. * i386-tdep.c: Include ax.h and ax-gdb.h. (i386_gen_return_address): New function. (i386_init_abi): Call it. * arch-utils.h (default_gen_return_address): Declare. * arch-utils.c (default_gen_return_address): New function. * gdbarch.sh (gen_return_address): New method. * gdbarch.h, gdbarch.c: Regenerate. * gdb.texinfo (Tracepoint Action Lists): Document $_ret. * gdb.trace/collection.exp: Test collection of $_ret.
Diffstat (limited to 'gdb/gdbarch.sh')
-rwxr-xr-xgdb/gdbarch.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 61094fb0400..dcf0343300f 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -820,6 +820,14 @@ v:const char *:solib_symbols_extension:::::::pstring (gdbarch->solib_symbols_ext
# is, absolute paths include a drive name, and the backslash is
# considered a directory separator.
v:int:has_dos_based_file_system:::0:0::0
+
+# Generate bytecodes to collect the return address in a frame.
+# Since the bytecodes run on the target, possibly with GDB not even
+# connected, the full unwinding machinery is not available, and
+# typically this function will issue bytecodes for one or more likely
+# places that the return address may be found.
+m:void:gen_return_address:struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope:ax, value, scope::default_gen_return_address::0
+
EOF
}
@@ -934,6 +942,7 @@ struct displaced_step_closure;
struct core_regset_section;
struct syscall;
struct agent_expr;
+struct axs_value;
/* The architecture associated with the connection to the target.