[PATCH v2 06/13] gdb: implement readnow_functions::lookup_global_symbol_language

Jan Vrany
2025-11-24T20:08:24Z

This commit implements readnow_functions::lookup_global_symbol_language
without using DWARF data structures. This will allow readnow_functions
to be used in other cases, for example in JIT reader.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33554
Approved-By: Tom Tromey <tom@tromey.com>
---
gdb/dwarf2/read.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 172f491ab9c..46ecbffd7fd 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -1555,6 +1555,15 @@ struct readnow_functions : public dwarf2_base_index_functions
{
}

+ enum language lookup_global_symbol_language (struct objfile *objfile,
+ const char *name,
+ domain_search_flags domain,
+ bool *symbol_found_p) override
+ {
+ *symbol_found_p = false;
+ return language_unknown;
+ }
+
void dump (struct objfile *objfile) override
{
}
--
2.51.0