aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-09-25 21:51:27 +0000
committerDoug Evans <dje@google.com>2013-09-25 21:51:27 +0000
commit20c681d15f0ca83a5fc4b6811585865799b79706 (patch)
treec8d285c80379eb04e943fa04b927b3d92d4a3cb7 /gdb/symtab.c
parentade7ed9e33d5f0bff646623bc8c905c0d782fcdc (diff)
downloadgdb-20c681d15f0ca83a5fc4b6811585865799b79706.zip
gdb-20c681d15f0ca83a5fc4b6811585865799b79706.tar.gz
gdb-20c681d15f0ca83a5fc4b6811585865799b79706.tar.bz2
* symtab.c (domain_name, search_domain_name): New functions.
* symtab.h (domain_name, search_domain_name): Declare.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 3bcec23..dbff042 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -143,6 +143,37 @@ multiple_symbols_select_mode (void)
const struct block *block_found;
+/* Return the name of a domain_enum. */
+
+const char *
+domain_name (domain_enum e)
+{
+ switch (e)
+ {
+ case UNDEF_DOMAIN: return "UNDEF_DOMAIN";
+ case VAR_DOMAIN: return "VAR_DOMAIN";
+ case STRUCT_DOMAIN: return "STRUCT_DOMAIN";
+ case LABEL_DOMAIN: return "LABEL_DOMAIN";
+ case COMMON_BLOCK_DOMAIN: return "COMMON_BLOCK_DOMAIN";
+ default: gdb_assert_not_reached ("bad domain_enum");
+ }
+}
+
+/* Return the name of a search_domain . */
+
+const char *
+search_domain_name (enum search_domain e)
+{
+ switch (e)
+ {
+ case VARIABLES_DOMAIN: return "VARIABLES_DOMAIN";
+ case FUNCTIONS_DOMAIN: return "FUNCTIONS_DOMAIN";
+ case TYPES_DOMAIN: return "TYPES_DOMAIN";
+ case ALL_DOMAIN: return "ALL_DOMAIN";
+ default: gdb_assert_not_reached ("bad search_domain");
+ }
+}
+
/* See whether FILENAME matches SEARCH_NAME using the rule that we
advertise to the user. (The manual's description of linespecs
describes what we advertise). Returns true if they match, false