aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2015-08-15 16:25:53 -0700
committerDoug Evans <xdje42@gmail.com>2015-08-15 16:25:53 -0700
commit51cdc99310171d6c53d2d00103a0ce34374d0b9b (patch)
tree36b05c52658f854c89eeaddf375341e048d8d1b1 /gdb/defs.h
parent95cf586902b681310e63ee06d89ba2498d1d5dcf (diff)
downloadgdb-51cdc99310171d6c53d2d00103a0ce34374d0b9b.zip
gdb-51cdc99310171d6c53d2d00103a0ce34374d0b9b.tar.gz
gdb-51cdc99310171d6c53d2d00103a0ce34374d0b9b.tar.bz2
Use macros for some enum bit field sizes.
gdb/ChangeLog: * defs.h (LANGUAGE_BITS): Define. * psympriv.h (partial_symbol) <domain>: Use SYMBOL_DOMAIN_BITS. (partial_symbol) <aclass>: Use SYMBOL_ACLASS_BITS. * symtab.h (general_symbol_info> <language>: Usage LANGUAGE_BITS. (minimal_symbol_type): Add nr_minsym_types. (MINSYM_TYPE_BITS): Define. (minimal_symbol) <type>: Use MINSYM_TYPE_BITS. (domain_enum_tag): Add NR_DOMAINS. (SYMBOL_DOMAIN_BITS): Change from 4 to 3. (SYMBOL_ACLASS_BITS): Define from 6 to 5.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index a555da1..f4951ab 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -186,6 +186,11 @@ enum language
nr_languages
};
+/* The number of bits needed to represent all languages, with enough
+ padding to allow for reasonable growth. */
+#define LANGUAGE_BITS 5
+gdb_static_assert (nr_languages <= (1 << LANGUAGE_BITS));
+
enum precision_type
{
single_precision,