Internals of -readnow implementation

Jan Vrany jan@vrany.io
Tue Nov 11 16:18:05 GMT 2025


Hi, 

looking at how -readnow is implemented, I'm puzzled
why implementation of readnow_functions inherits/user
dwarf2_base_index_functions?

My understanding is that if -readnow is specified, then
all compunit symbtabs in that objfile are fully read.
It seems to me that in theory one can implement it "directly" 
by traversing compunit symtabs, its blockvector and symbols 
(rather than using dwarf2_per_objfile and alike). 

Is that because it was just easier to implement it this way
or is there a reason why it has to go through DWARF reader
structures?

Thanks, 
Jan



More information about the Gdb mailing list