aboutsummaryrefslogtreecommitdiff
path: root/gdb/linespec.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-14 16:56:38 -0600
committerTom Tromey <tom@tromey.com>2023-08-31 12:41:02 -0600
commit911e1e795e2496e1a5315601ab89e56afcd10fb0 (patch)
tree6238e7783a5cf642c10652b3651c85768781c22a /gdb/linespec.c
parent8c329d5c651e671f9aa9ed87224dc9943a7f76e6 (diff)
downloadbinutils-911e1e795e2496e1a5315601ab89e56afcd10fb0.zip
binutils-911e1e795e2496e1a5315601ab89e56afcd10fb0.tar.gz
binutils-911e1e795e2496e1a5315601ab89e56afcd10fb0.tar.bz2
Add symbol::matches method
This adds symbol::matches, a wrapper for symbol_matches_domain. Most places calling symbol_matches_domain can call this method instead, which is a bit less wordy and also (IMO) clearer. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r--gdb/linespec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c
index fd9f54d..fa733d8 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -3908,8 +3908,7 @@ find_label_symbols_in_block (const struct block *block,
for (struct symbol *sym : block_iterator_range (block))
{
- if (symbol_matches_domain (sym->language (),
- sym->domain (), LABEL_DOMAIN)
+ if (sym->matches (LABEL_DOMAIN)
&& cmp (sym->search_name (), name, name_len) == 0)
{
result->push_back ({sym, block});