This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 4/6] [PR 17684] SYMBOL_DOMAIN_BITS
- From: Doug Evans <xdje42 at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 18 Dec 2014 04:26:45 -0800
- Subject: [PATCH 4/6] [PR 17684] SYMBOL_DOMAIN_BITS
- Authentication-results: sourceware.org; auth=none
This patch just adds a new macro and then uses it in the definition of
struct symbol.domain.
I need to add a new bitfield to this struct, so I took a bit from
"domain", and shrunk it by one more for future's sake.
4 bits for domain is plenty at the moment.
2014-12-18 Doug Evans <xdje42@gmail.com>
* symtab.h (SYMBOL_DOMAIN_BITS): New macro.
(struct symbol) <domain>: Use it.
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 3a3384d..b3a9a6b 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -461,6 +461,10 @@ typedef enum domain_enum_tag
COMMON_BLOCK_DOMAIN
} domain_enum;
+/* The number of bits in a symbol used to represent the domain. */
+
+#define SYMBOL_DOMAIN_BITS 4
+
extern const char *domain_name (domain_enum);
/* Searching domains, used for `search_symbols'. Element numbers are
@@ -714,7 +718,7 @@ struct symbol
/* Domain code. */
- ENUM_BITFIELD(domain_enum_tag) domain : 6;
+ ENUM_BITFIELD(domain_enum_tag) domain : SYMBOL_DOMAIN_BITS;
/* Address class. This holds an index into the 'symbol_impls'
table. The actual enum address_class value is stored there,