aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-11-17 13:12:23 +0000
committerPedro Alves <palves@redhat.com>2015-11-17 15:30:33 +0000
commitb6b806729dd5c4c46981d59f351460b4d7989548 (patch)
tree2375373e54bf92767efdf75e4309bb558a9c209d /gdb/symtab.h
parenteec461d0a8e7ae14c7fe8f0196ab8d0e30285d83 (diff)
downloadgdb-b6b806729dd5c4c46981d59f351460b4d7989548.zip
gdb-b6b806729dd5c4c46981d59f351460b4d7989548.tar.gz
gdb-b6b806729dd5c4c46981d59f351460b4d7989548.tar.bz2
Introduce null_block_symbol
... in the spirit of null_ptid, null_frame_id, etc. Fixes two instances of: /root/binutils-gdb/gdb/cp-namespace.c: In function 'block_symbol cp_lookup_nested_symbol(type*, const char*, const block*, domain_enum)': /root/binutils-gdb/gdb/cp-namespace.c:1010: warning: jump to case label /root/binutils-gdb/gdb/cp-namespace.c:1008: error: crosses initialization of 'block_symbol <anonymous>' Compiler info: Reading specs from /usr/lib/gcc-lib/amd64-unknown-openbsd5.8/4.2.1/specs Target: amd64-unknown-openbsd5.8 Configured with: OpenBSD/amd64 system compiler Thread model: posix gcc version 4.2.1 20070719 gdb/ChangeLog: 2015-11-17 Pedro Alves <palves@redhat.com> * cp-namespace.c (cp_lookup_bare_symbol) (cp_search_static_and_baseclasses, cp_lookup_symbol_via_imports) (cp_lookup_symbol_via_all_imports, cp_lookup_nested_symbol_1) (cp_lookup_nested_symbol): Use null_block_symbol. * d-namespace.c (d_lookup_symbol, d_lookup_nested_symbol) (d_lookup_symbol_imports, d_lookup_symbol_module): Use null_block_symbol. * symtab.c (null_block_symbol): New global. * symtab.h (null_block_symbol): Declare.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 27b27c8..37c8c93 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -832,6 +832,10 @@ struct block_symbol
extern const struct symbol_impl *symbol_impls;
+/* For convenience. All fields are NULL. This means "there is no
+ symbol". */
+extern const struct block_symbol null_block_symbol;
+
/* Note: There is no accessor macro for symbol.owner because it is
"private". */