This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Failures in subsequent Runs
- From: Michal Ludvig <mludvig at suse dot cz>
- To: gdb <gdb at sources dot redhat dot com>
- Date: Fri, 20 Dec 2002 14:39:56 +0100
- Subject: Re: Failures in subsequent Runs
- Organization: SuSE CR
- References: <3DFF3F80.5020303@suse.cz>
Michal Ludvig wrote:
Hi all,
I'm having problems on x86-64 when running a program for a second time
within the same session. I'm afraid I'm not doing all the necessary
cleanup of the CFI engine when the first run is killed or finished.
What needs to be done
1) when running the same program for a second time?
2) when loading a new program using a 'file' command?
Are there any hooks that I should attach to to handle these situations?
So far I've found that there is a run_cleanup_chain where I can add my
new cfi_cleanup() function. But:
1) do_run_cleanups() calls do_my_cleanups() that destroys the list of
functions in the chain after calling them. So I created
do_my_cleanups_keeplist() to avoid it.
2) yet before calling do_run_cleanups() the function
objfile_purge_solibs() is invoked and destroys the list of objfiles.
This list is however linked from dwarf2cfi.c cie_chunks list => whole
cie_chunks list is unusable and I must rebuild it.
The problem is, that I don't know how. Reading Dwarf2 CFI information is
triggered automatically when symbols are read from a given file. This is
fine for shared libs, because they are re-read on each run. But the main
file isn't and I'm not sure about the clean way to fetch CFI information
from it.
I'd be happy with having a way to call dwarf2_build_frame_info() for the
mainfile's objfile pointer after clearing cie_chunks and fde_chunks.
Could someone please point me to the right direction?
Thanks in advance!
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* (+420) 296.545.373 * http://www.suse.cz