diff options
author | Lancelot SIX <lancelot.six@amd.com> | 2024-01-29 18:28:52 +0000 |
---|---|---|
committer | Lancelot SIX <lancelot.six@amd.com> | 2024-01-29 20:20:30 +0000 |
commit | 878e894801169461adc00129ad33947ad541420d (patch) | |
tree | cff4e307be0aa3d24a60863322a314ad82ccac98 /gdb/symtab.h | |
parent | 34e222d3c20f33adae7d0841bc37dc9ac61fb1cd (diff) | |
download | gdb-878e894801169461adc00129ad33947ad541420d.zip gdb-878e894801169461adc00129ad33947ad541420d.tar.gz gdb-878e894801169461adc00129ad33947ad541420d.tar.bz2 |
gdb: Use SYM_DOMAIN instead of DOMAIN when calling sym-domains.def
Since commit 6771fc6f1d9 "Use a .def file for domain_enum", the
sym-domains.def file has been introduced, and requires the user to
define the DOMAIN(x) macro.
On older systems (centos-7 with glibc-2.17 for example), this DOMAIN
macro conflicts with another macro defined in /usr/include/math.h.
Fix this conflict by changing sym-domains.def to use a macro named
SYM_DOMAIN instead of DOMAIN.
Change-Id: I679df30e2bd2f4333343f16bbd2a3511a37550a3
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 3029f60..d43207ed 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -894,9 +894,9 @@ private: enum domain_enum { -#define DOMAIN(X) X ## _DOMAIN, +#define SYM_DOMAIN(X) X ## _DOMAIN, #include "sym-domains.def" -#undef DOMAIN +#undef SYM_DOMAIN }; /* The number of bits in a symbol used to represent the domain. */ @@ -909,19 +909,19 @@ extern const char *domain_name (domain_enum); let the search match multiple kinds of symbol. */ enum domain_search_flag { -#define DOMAIN(X) \ +#define SYM_DOMAIN(X) \ SEARCH_ ## X ## _DOMAIN = (1 << X ## _DOMAIN), #include "sym-domains.def" -#undef DOMAIN +#undef SYM_DOMAIN }; DEF_ENUM_FLAGS_TYPE (enum domain_search_flag, domain_search_flags); /* A convenience constant to search for any symbol. */ constexpr domain_search_flags SEARCH_ALL = ((domain_search_flags) 0 -#define DOMAIN(X) | SEARCH_ ## X ## _DOMAIN +#define SYM_DOMAIN(X) | SEARCH_ ## X ## _DOMAIN #include "sym-domains.def" -#undef DOMAIN +#undef SYM_DOMAIN ); /* A convenience define for "C-like" name lookups, matching variables, |