This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] Make the partial DIE cache more robust
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sources dot redhat dot com, Elena Zannoni <ezannoni at redhat dot com>
- Date: Sat, 30 Apr 2005 14:50:28 -0400
- Subject: Re: [rfa] Make the partial DIE cache more robust
- References: <20050407142959.GA9927@nevyn.them.org>
On Thu, Apr 07, 2005 at 10:30:00AM -0400, Daniel Jacobowitz wrote:
> There have been several GDB and GCC bug reports about the partial DIE cache.
> GDB only saves DIEs of the types that it expects to find
> specification/abstract-origin references to; when GCC emits an unexpected
> reference, GDB is stuck.
>
> This patch gets GDB unstuck. We still load only the DIEs we expect to need;
> and this patch includes a change similar to Manoj's, to expand the set of
> "expected" DIEs to include DW_TAG_member. However, if we try to load a DIE
> and can not find it in cache, but we can find its CU, we will now go back
> and reload the compilation unit without any heuristics.
>
> An example of this is any file-scope reference to a function-local DIE;
> normally we don't walk into functions when loading partial DIEs, because
> it's only necessary in rare cases. For instance the ARM RVCT compiler will
> emit out-of-line definitions of methods for function-scope classes. The
> class definition and member function declarations are inside the function,
> but the member function definitions are outside (in fact, they're in a
> different DW_TAG_compile_unit).
>
> Another example is GCC PR debug/20805. Whether or not the debug information
> in that PR is formally correct, reducing the ways in which GDB can choke on
> invalid input would be a good thing.
>
> Is this patch OK?
Hi Elena,
Have you had a chance to review this patch?
--
Daniel Jacobowitz
CodeSourcery, LLC