[PATCH v2 02/13] gdb: implement readnow_functions::has_symbols

Jan Vrany
2025-11-24T19:57:53Z

This commit implements readnow_functions::has_symbols
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 | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 561e2dc2add..444c0c22b69 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -1533,6 +1533,11 @@ struct quick_file_names

struct readnow_functions : public dwarf2_base_index_functions
{
+ bool has_symbols (struct objfile *objfile) override
+ {
+ return true;
+ }
+
void dump (struct objfile *objfile) override
{
}
--
2.51.0