Add block_search_flags
authorTom Tromey <tom@tromey.com>
Sat, 17 Apr 2021 15:35:04 +0000 (09:35 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 17 Apr 2021 15:35:04 +0000 (09:35 -0600)
This adds block_search_flags, a flag enum.  This will be used to by
certain search functions so that the caller can control which blocks
are searched more precisely.

gdb/ChangeLog
2021-04-17  Tom Tromey  <tom@tromey.com>

* quick-symbol.h (enum block_search_flag_values): New.
(block_search_flags): New enum flags type.

gdb/ChangeLog
gdb/quick-symbol.h

index d5b6c30908453c9d515f0cfb6baf8c83f8186f48..84ce6c16f4b58bcb7b3856c5cf2fd53f84052121 100644 (file)
@@ -1,3 +1,8 @@
+2021-04-17  Tom Tromey  <tom@tromey.com>
+
+       * quick-symbol.h (enum block_search_flag_values): New.
+       (block_search_flags): New enum flags type.
+
 2021-04-16  Tom Tromey  <tom@tromey.com>
 
        * rust-parse.c: New file.
index d907b1df488d38693390849c22b4076de051f9ba..7e22108d7ddb0c0df06e2571224067955cd15389 100644 (file)
 #ifndef GDB_QUICK_SYMBOL_H
 #define GDB_QUICK_SYMBOL_H
 
+/* Like block_enum, but used as flags to pass to lookup functions.  */
+
+enum block_search_flag_values
+{
+  SEARCH_GLOBAL_BLOCK = 1,
+  SEARCH_STATIC_BLOCK = 2
+};
+
+DEF_ENUM_FLAGS_TYPE (enum block_search_flag_values, block_search_flags);
+
 /* Comparison function for symbol look ups.  */
 
 typedef int (symbol_compare_ftype) (const char *string1,