aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-03-02 13:00:45 -0700
committerTom Tromey <tromey@adacore.com>2021-03-02 13:00:45 -0700
commitd1183b064cae59353c3a80d27dc250ca440cb879 (patch)
tree3c785263d8956cffeacc78319fd7dace968f3daa /gdb/ada-lang.h
parent886d459fbea73da4b07bae37f4526b766cbd90e8 (diff)
downloadgdb-d1183b064cae59353c3a80d27dc250ca440cb879.zip
gdb-d1183b064cae59353c3a80d27dc250ca440cb879.tar.gz
gdb-d1183b064cae59353c3a80d27dc250ca440cb879.tar.bz2
Return a vector from ada_lookup_symbol_list
This changes ada_lookup_symbol_list to return a std::vector, and changes various other helper functions to follow. This simplifies the code, and makes it more type-safe (by using a vector where an obstack had been used). gdb/ChangeLog 2021-03-02 Tom Tromey <tromey@adacore.com> * ada-lang.h (ada_lookup_symbol_list): Return a vector. * ada-lang.c (resolve_subexp): Update. (ada_resolve_function): Accept a vector. (is_nonfunction, add_defn_to_vec) (add_symbols_from_enclosing_procs): Likewise. (num_defns_collected, defns_collected): Remove. (remove_extra_symbols): Return a vector. (remove_irrelevant_renamings): Return void. (ada_add_local_symbols): Accept a vector. (struct match_data) <obstackp>: Remove. <resultp>: New member. (aux_add_nonlocal_symbols): Update. (ada_add_block_renamings, add_nonlocal_symbols) (ada_add_all_symbols): Accept a vector. (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Return a vector. (ada_lookup_symbol): Update. (ada_add_block_symbols): Accept a vector. (get_var_value, iterate_over_symbols): Update. * ada-exp.y (block_lookup, write_var_or_type, write_name_assoc): Update.
Diffstat (limited to 'gdb/ada-lang.h')
-rw-r--r--gdb/ada-lang.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h
index dbf45a8..8be4bf4 100644
--- a/gdb/ada-lang.h
+++ b/gdb/ada-lang.h
@@ -218,9 +218,8 @@ extern const char *ada_decode_symbol (const struct general_symbol_info *);
extern std::string ada_decode (const char*);
-extern int ada_lookup_symbol_list (const char *, const struct block *,
- domain_enum,
- std::vector<struct block_symbol> *);
+extern std::vector<struct block_symbol> ada_lookup_symbol_list
+ (const char *, const struct block *, domain_enum);
extern struct block_symbol ada_lookup_symbol (const char *,
const struct block *,