aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-06-22 10:23:30 +0100
committerPedro Alves <palves@redhat.com>2017-06-22 10:59:42 +0100
commitd269dfc64fb5307dbbaecbc5d55861a705b729ab (patch)
treef1a6ff725f1975447fa4605d2575002ea145c689 /gdb/common/agent.h
parentcommon/agent.h: Add missing include guards (diff)
downloadbinutils-gdb-d269dfc64fb5307dbbaecbc5d55861a705b729ab.tar.gz
binutils-gdb-d269dfc64fb5307dbbaecbc5d55861a705b729ab.tar.bz2
binutils-gdb-d269dfc64fb5307dbbaecbc5d55861a705b729ab.zip
Add STRINGIFY to gdb/common/preprocessor.h
We have several copies of this common idiom under gdb/ currently. This commit moves them / factors them out to gdb/common/preprocessor.h. gdb/ChangeLog: 2017-06-22 Pedro Alves <palves@redhat.com> * common/agent.h: Include "common/preprocessor.h". (STRINGIZE_1, STRINGIZE): Delete. (IPA_SYM): Use STRINGIFY instead. * common/preprocessor.h (STRINGIFY_1, STRINGIFY): New. * compile/compile-c-support.c: Include "common/preprocessor.h". (STR, STRINGIFY): Delete. * ia64-libunwind-tdep.c: Include "common/preprocessor.h". (STRINGIFY2, STRINGIFY): Delete.
Diffstat (limited to 'gdb/common/agent.h')
-rw-r--r--gdb/common/agent.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/common/agent.h b/gdb/common/agent.h
index 66f57ad4b08..f24f4826f35 100644
--- a/gdb/common/agent.h
+++ b/gdb/common/agent.h
@@ -20,16 +20,16 @@
#ifndef COMMON_AGENT_H
#define COMMON_AGENT_H
+#include "common/preprocessor.h"
+
int agent_run_command (int pid, const char *cmd, int len);
int agent_look_up_symbols (void *);
-#define STRINGIZE_1(STR) #STR
-#define STRINGIZE(STR) STRINGIZE_1(STR)
#define IPA_SYM_EXPORTED_NAME(SYM) gdb_agent_ ## SYM
#define IPA_SYM(SYM) \
{ \
- STRINGIZE (IPA_SYM_EXPORTED_NAME (SYM)), \
+ STRINGIFY (IPA_SYM_EXPORTED_NAME (SYM)), \
offsetof (struct ipa_sym_addresses, addr_ ## SYM) \
}