aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/tracepoint.h
diff options
context:
space:
mode:
authorMarcin Koƛcielnicki <koriakin@0x04.net>2016-03-11 15:51:29 +0100
committerMarcin Koƛcielnicki <koriakin@0x04.net>2016-03-30 23:48:47 +0200
commit1cda1512689aabb36588a01370002632a0c8e560 (patch)
tree4da30ad2346290a1e0a4aecdaf761b493b76dcff /gdb/gdbserver/tracepoint.h
parent0a106562e3ab2582854b28d82025ccd5e5d1ad00 (diff)
downloadgdb-1cda1512689aabb36588a01370002632a0c8e560.zip
gdb-1cda1512689aabb36588a01370002632a0c8e560.tar.gz
gdb-1cda1512689aabb36588a01370002632a0c8e560.tar.bz2
gdbserver/IPA: Export some functions via global function pointers.
On powerpc64, qSymbol for a function returns the function code address, and not the descriptor address. Since we emit code calling gdb_collect and some other functions, we need the descriptor (no way to know the proper TOC address without it). To get the descriptor address, make global function pointer variables in the IPA pointing to the relevant functions and read them instead of asking for them directly via qSymbol. gdb/gdbserver/ChangeLog: * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg. * linux-amd64-ipa.c: Likewise. * linux-i386-ipa.c: Likewise. * linux-s390-ipa.c: Likewise. * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect, ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr, set_trace_state_variable_value_ptr. (struct ipa_sym_addresses): Likewise. (symbol_list): Likewise. (install_fast_tracepoint): Dereference gdb_collect_ptr instead of accessing gdb_collect directly. (gdb_collect_ptr_type): New typedef. (get_raw_reg_ptr_type): New typedef. (get_trace_state_variable_value_ptr_type): New typedef. (set_trace_state_variable_value_ptr_type): New typedef. (gdb_collect_ptr): New global. (get_raw_reg_ptr): New global. (get_trace_state_variable_value_ptr): New global. (set_trace_state_variable_value_ptr): New global. (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of accessing get_raw_reg directly. (get_get_tsv_func_addr): Likewise for get_trace_state_variable_value_ptr. (get_set_tsv_func_addr): Likewise for set_trace_state_variable_value_ptr. * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
Diffstat (limited to 'gdb/gdbserver/tracepoint.h')
-rw-r--r--gdb/gdbserver/tracepoint.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/gdbserver/tracepoint.h b/gdb/gdbserver/tracepoint.h
index e30f4f7..df815ef 100644
--- a/gdb/gdbserver/tracepoint.h
+++ b/gdb/gdbserver/tracepoint.h
@@ -163,8 +163,7 @@ int agent_mem_read_string (struct eval_agent_expr_context *ctx,
/* The prototype the get_raw_reg function in the IPA. Each arch's
bytecode compiler emits calls to this function. */
-IP_AGENT_EXPORT_FUNC ULONGEST gdb_agent_get_raw_reg
- (const unsigned char *raw_regs, int regnum);
+ULONGEST get_raw_reg (const unsigned char *raw_regs, int regnum);
/* Returns the address of the get_raw_reg function in the IPA. */
CORE_ADDR get_raw_reg_func_addr (void);