aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-11-17 12:05:58 -0700
committerTom Tromey <tom@tromey.com>2017-11-17 14:34:14 -0700
commitcf724bc93ee954a6f7aac0557afc41c1316dc80c (patch)
tree4fe0e1abc6f5e512121fa9ad6e263b2aff6682bf /gdb/rust-lang.c
parent68e745e38edebd2a12d60ef7b5774066db3f1c40 (diff)
downloadgdb-cf724bc93ee954a6f7aac0557afc41c1316dc80c.zip
gdb-cf724bc93ee954a6f7aac0557afc41c1316dc80c.tar.gz
gdb-cf724bc93ee954a6f7aac0557afc41c1316dc80c.tar.bz2
Use an enum to represent subclasses of symbol
This changes struct symbol to use an enum to encode the concrete subclass of a particular symbol. Note that "enum class" doesn't work properly with bitfields, so a plain enum is used. 2017-11-17 Tom Tromey <tom@tromey.com> * symtab.h (enum symbol_subclass_kind): New. (struct symbol) <is_cplus_template_function, is_rust_vtable>: Remove. <subclass>: New member. (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update. * rust-lang.c (rust_get_trait_object_pointer): Update. * dwarf2read.c (read_func_scope): Update. (read_variable): Update.
Diffstat (limited to 'gdb/rust-lang.c')
-rw-r--r--gdb/rust-lang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index 832f77f..f3562e0 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -421,7 +421,7 @@ rust_get_trait_object_pointer (struct value *value)
CORE_ADDR vtable = value_as_address (value_field (value, vtable_field));
struct symbol *symbol = find_symbol_at_address (vtable);
- if (symbol == NULL || !symbol->is_rust_vtable)
+ if (symbol == NULL || symbol->subclass != SYMBOL_RUST_VTABLE)
return NULL;
struct rust_vtable_symbol *vtable_sym