Hi all, the attached is a fix for the problem described here: http://sources.redhat.com/ml/gdb/2002-12/msg00246.html I've created a new function cleanup_cfi() in dwarf2cfi.c that deletes all CIEs and FDEs of objfiles removed later by objfile_purge_solibs(). So far it works fine but I don't know how should I correctly call it. For now I put the call directly to run_command(): static void run_command (char *args, int from_tty) { [...] clear_breakpoint_hit_counts (); cleanup_cfi (); /* <=== HERE */ objfile_purge_solibs (); do_run_cleanups (NULL); reopen_exec_file (); reread_symbols (); [...] } I know it isn't the right solution because it would require linking of dwarf2cfi.o to all targets. If I would wrap it by #ifdef X86_64 ... #endif it still isn't perfect, because other archs will hopefully use CFI in the future as well. I was thinking about defining something like USE_DWARF2CFI for each target that use it in their config/whatever file...? Is it a way to go? I can't attach this function to run_cleanup_chain, because I need to call cleanup_cfi() before objfile_purge_solibs() and also because do_run_cleanups() finally destroys the contents of run_cleanup_chain and finally because I don't know how (when/where) to attach cleanup_cfi() to run_cleanup_chain. Could someone please tell me what is the cleanest way to call cleanup_cfi()? Thanks. Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * (+420) 296.545.373 * http://www.suse.cz