A revised patch for dlclose

Jim Kingdon kingdon@redhat.com
Wed Mar 8 06:41:00 GMT 2000


> If each DSO was given its own obstack, it would be pretty easy.

This is largely a solved problem (via objfiles).

See my dlclose() patch:
  http://sourceware.cygnus.com/ml/gdb-patches/2000-q1/msg00454.html
especially the call to free_objfile.

Or for another example look at clear_solib which works one struct
so_list at a time.

There are a few loose ends in freeing, but it is the tangled logic in
find_solib that is tripping us up more than the freeing.


More information about the Gdb mailing list