aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 5dfe953..8cd3496 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -167,9 +167,11 @@ class lookup_name_info final
/* Create a new object. */
lookup_name_info (std::string name,
symbol_name_match_type match_type,
- bool completion_mode = false)
+ bool completion_mode = false,
+ bool ignore_parameters = false)
: m_match_type (match_type),
m_completion_mode (completion_mode),
+ m_ignore_parameters (ignore_parameters),
m_name (std::move (name))
{}
@@ -177,6 +179,16 @@ class lookup_name_info final
symbol_name_match_type match_type () const { return m_match_type; }
bool completion_mode () const { return m_completion_mode; }
const std::string &name () const { return m_name; }
+ const bool ignore_parameters () const { return m_ignore_parameters; }
+
+ /* Return a version of this lookup name that is usable with
+ comparisons against symbols have no parameter info, such as
+ psymbols and GDB index symbols. */
+ lookup_name_info make_ignore_params () const
+ {
+ return lookup_name_info (m_name, m_match_type, m_completion_mode,
+ true /* ignore params */);
+ }
/* Get the search name hash for searches in language LANG. */
unsigned int search_name_hash (language lang) const
@@ -253,6 +265,7 @@ private:
/* The lookup info as passed to the ctor. */
symbol_name_match_type m_match_type;
bool m_completion_mode;
+ bool m_ignore_parameters;
std::string m_name;
/* Language-specific info. These fields are filled lazily the first