This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Artifical dwarf2 debug info
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>,Michal Ludvig <mludvig at suse dot cz>
- Cc: GDB Patches <gdb-patches at sources dot redhat dot com>
- Date: Thu, 02 Jan 2003 20:54:33 +0000
- Subject: Re: [RFA] Artifical dwarf2 debug info
- References: <3DFE1ECD.5080908@redhat.com> <20021216185750.GA24656@nevyn.them.org> <3DFE289B.3080904@redhat.com> <20021216193459.GA27215@nevyn.them.org> <3DFE3007.3040100@redhat.com> <20021216201117.GA31474@nevyn.them.org> <3DFF185B.9090806@suse.cz> <3DFF3353.2090803@redhat.com> <20021217151304.GA5778@nevyn.them.org> <3E0057EB.1080104@redhat.com> <20021218153733.GA11738@nevyn.them.org>
fde = get_fde_for_addr (context->ra - 1);
> >+
> >+ if (fde == NULL)
> >+ fde = guess_generic_fde (context->ra - 1);
> >
> > if (fde == NULL)
> > return;
Just to be clear. The above is the change that I think is wrong.
Instead of this function `guessing' the source of the FDE, the code
needs to be re-structured so that the caller always supplies a
pre-created FDE.
That way a dwarf2 cfi frame can call the above function with an FDE
built from the object files debug info, while an artifical frame can
call it with an artifically created FDE. There is no guessing involved.
--
This is part of a long standing problem - it predates dwarf2cf by many
years. Instead of using recursion, people modify debug/target dependent
frame code so that it attempts to directly handle all cases. Cf all the
PC_IN_CALL_DUMMY(frame->next), PC_IN_SIGTRAMP(frame->next) and other
tests scattered through out the -tdep.c code; and the calls to
get_next_frame() in dwarf2cfi.c.
Andrew