This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Nullified garbage-collected global variables
Tom Tromey (tromey@redhat.com):
> Do you need to apply the same treatment to full symbols? What happens
> if the psymtab is expanded for some other reason and a full symbol of
> this sort is then created? Or is that already impossible?
Well, that sounded unlikely; then I double-checked, and experimental
results rejected my assumption. e.g. my example without --readnow:
(gdb) p my_global_symbol
No symbol "my_global_symbol" in current context.
and with --readnow:
(gdb) p my_global_symbol
Cannot access memory at address 0x0
Thank you for catching that. I'll fix my patch.
> What about has_section_at_zero?
Right, it's worth protecting us against this case as well (as we do for
elminated functions). I'll add a guard.
Thank you for the review,
Jerome