diff options
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/common/agent.c | 8 | ||||
-rw-r--r-- | gdb/common/agent.h | 9 | ||||
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/tracepoint.c | 4 |
5 files changed, 28 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 33813045733..2b64e888c3d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2018-08-28 Simon Marchi <simon.marchi@polymtl.ca> + + PR build/23399 + * common/agent.c (IPA_SYM_STRUCT_NAME): Define. + (struct ipa_sym_addresses): Rename to... + (struct ipa_sym_addresses_common): ... this. + * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME. + 2018-08-28 Tom Tromey <tom@tromey.com> * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC. diff --git a/gdb/common/agent.c b/gdb/common/agent.c index 8f80aee5332..41884b9c96c 100644 --- a/gdb/common/agent.c +++ b/gdb/common/agent.c @@ -21,9 +21,11 @@ #include "target/target.h" #include "common/symbol.h" #include <unistd.h> -#include "agent.h" #include "filestuff.h" +#define IPA_SYM_STRUCT_NAME ipa_sym_addresses_common +#include "agent.h" + int debug_agent = 0; /* A stdarg wrapper for debug_vprintf. */ @@ -48,7 +50,7 @@ int use_agent = 0; /* Addresses of in-process agent's symbols both GDB and GDBserver cares about. */ -struct ipa_sym_addresses +struct ipa_sym_addresses_common { CORE_ADDR addr_helper_thread_id; CORE_ADDR addr_cmd_buf; @@ -69,7 +71,7 @@ static struct IPA_SYM(capability), }; -static struct ipa_sym_addresses ipa_sym_addrs; +static struct ipa_sym_addresses_common ipa_sym_addrs; static int all_agent_symbols_looked_up = 0; diff --git a/gdb/common/agent.h b/gdb/common/agent.h index 66b693791e2..5be07b845be 100644 --- a/gdb/common/agent.h +++ b/gdb/common/agent.h @@ -27,10 +27,15 @@ int agent_run_command (int pid, const char *cmd, int len); int agent_look_up_symbols (void *); #define IPA_SYM_EXPORTED_NAME(SYM) gdb_agent_ ## SYM + +/* Define an entry in an IPA symbol list array. If IPA_SYM is used, the macro + IPA_SYM_STRUCT_NAME must be defined to the structure name holding the IPA + symbol addresses in that particular file, before including + common/agent.h. */ #define IPA_SYM(SYM) \ { \ - STRINGIFY (IPA_SYM_EXPORTED_NAME (SYM)), \ - offsetof (struct ipa_sym_addresses, addr_ ## SYM) \ + STRINGIFY (IPA_SYM_EXPORTED_NAME (SYM)), \ + offsetof (IPA_SYM_STRUCT_NAME, addr_ ## SYM) \ } /* The size in bytes of the buffer used to talk to the IPA helper diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index cdc8afd1fa4..cd0318c79aa 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2018-08-28 Simon Marchi <simon.marchi@polymtl.ca> + + PR build/23399 + * tracepoint.c (IPA_SYM_STRUCT_NAME): Define. + 2018-08-27 Tom Tromey <tom@tromey.com> PR build/23087: diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index ad2a80185a1..9959d0598dd 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -19,7 +19,6 @@ #include "server.h" #include "tracepoint.h" #include "gdbthread.h" -#include "agent.h" #include "rsp-low.h" #include <ctype.h> @@ -30,6 +29,9 @@ #include "ax.h" #include "tdesc.h" +#define IPA_SYM_STRUCT_NAME ipa_sym_addresses +#include "agent.h" + #define DEFAULT_TRACE_BUFFER_SIZE 5242880 /* 5*1024*1024 */ /* This file is built for both GDBserver, and the in-process |