diff options
Diffstat (limited to 'gdb/gdb_bfd.h')
-rw-r--r-- | gdb/gdb_bfd.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/gdb_bfd.h b/gdb/gdb_bfd.h index d35f2d6..41ce5ce 100644 --- a/gdb/gdb_bfd.h +++ b/gdb/gdb_bfd.h @@ -1,6 +1,6 @@ /* Definitions for BFD wrappers used by GDB. - Copyright (C) 2011-2024 Free Software Foundation, Inc. + Copyright (C) 2011-2025 Free Software Foundation, Inc. This file is part of GDB. @@ -274,4 +274,16 @@ extern std::string gdb_bfd_errmsg (bfd_error_type error_tag, char **matching); extern void gdb_bfd_init (); +/* A wrapper for bfd_canonicalize_symtab that caches the result. This + is important to avoid excess memory use on repeated calls. See + PR gdb/32758. bfd_canonicalize_symtab should not be called directly + by other code in gdb. + + When SHOULD_THROW is true (the default), this will throw an + exception if symbols could not be read. When SHOULD_THROW is + false, an empty view is returned instead. */ + +extern gdb::array_view<asymbol *> gdb_bfd_canonicalize_symtab + (bfd *abfd, bool should_throw = true); + #endif /* GDB_GDB_BFD_H */ |