[PATCH v2 05/13] gdb: implement readnow_functions::forget_cached_source_info

Jan Vrany
2025-11-24T20:05:57Z

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

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index e408f852dc0..172f491ab9c 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -1551,6 +1551,10 @@ struct readnow_functions : public dwarf2_base_index_functions
return objfile->compunit_symtabs.back ().primary_filetab ();
}

+ void forget_cached_source_info (struct objfile *objfile) override
+ {
+ }
+
void dump (struct objfile *objfile) override
{
}
--
2.51.0