aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-09-16 15:00:13 -0600
committerTom Tromey <tom@tromey.com>2023-09-18 12:34:33 -0600
commite8aafb7d7a5025130ba713450fc6108506f0ee15 (patch)
treea14ad152d09af29389a1681dd268845e8e7dd1f5 /gdb/symtab.h
parent4eaa39a22ddcac55f3b0dbbf5f4200ebff1be343 (diff)
downloadbinutils-e8aafb7d7a5025130ba713450fc6108506f0ee15.zip
binutils-e8aafb7d7a5025130ba713450fc6108506f0ee15.tar.gz
binutils-e8aafb7d7a5025130ba713450fc6108506f0ee15.tar.bz2
More type safety for symbol_search
This patch changes class symbol_search to store a block_enum rather than an int. Regression tested on x86-64 Fedora 38. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 8f58780..3657433 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -2479,7 +2479,7 @@ extern symbol *find_function_alias_target (bound_minimal_symbol msymbol);
the following structs is returned. */
struct symbol_search
{
- symbol_search (int block_, struct symbol *symbol_)
+ symbol_search (block_enum block_, struct symbol *symbol_)
: block (block_),
symbol (symbol_)
{
@@ -2487,7 +2487,7 @@ struct symbol_search
msymbol.objfile = nullptr;
}
- symbol_search (int block_, struct minimal_symbol *minsym,
+ symbol_search (block_enum block_, struct minimal_symbol *minsym,
struct objfile *objfile)
: block (block_),
symbol (nullptr)
@@ -2506,9 +2506,9 @@ struct symbol_search
return compare_search_syms (*this, other) == 0;
}
- /* The block in which the match was found. Could be, for example,
- STATIC_BLOCK or GLOBAL_BLOCK. */
- int block;
+ /* The block in which the match was found. Either STATIC_BLOCK or
+ GLOBAL_BLOCK. */
+ block_enum block;
/* Information describing what was found.