This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Linux-ia64] Re: gdb null ptr


[CC to linux-ia64@linuxia64.org trimmed since this is primarly a gdb
matter.]

On Nov 3, 10:20pm, Daniel Berlin wrote:

> > I will leave it to the dwarf2 maintainers to decide whether this
> > patch is acceptable or if it would be better to implement one of
> > Jim's other suggestions.
> > 
> 
> Unfortuantely , this is actually still wrong for languages other than
> C++, because we don't have the same guarantees about uniqueness in the name.
> 
> I was actually in the process of readying patches that add the same
> type of name based caching (based on mangled name) to partial and
> normal symbol reading, which gives us an amazing win for C++.
> 
> These patches also moved all of the name caching into "if (cu_language
> == language_cplus)" blocks, doing what we used to do in the old case
> (IE no caching).
> 
> Rather than let this stay broken until i finish cleaning up those
> patches, here is a patch that moves the type caching so it only
> happens for C++ CU's.

I hereby withdraw my patch from consideration in favor of Daniel's
patch.  In my opinion, Daniel's patch should go in ASAP since the code
in question has been broken since June 5 according to cvs annotate. 
For some reason, the corresponding ChangeLog entry is May 30.

The other alternative is to revert the May 30/June 5 patch.

> Unless other languages make the same guarantees, we can't do the same
> optimization.

Agreed.  I've constructed a small example and have convinced myself that
the code presently in dwarf2read.c is broken for C, but not for C++.

> I have added the same type of code kevin has to the patches i am
> readying.

Good.

You may wish to prepare a new interim patch which has a proper
ChangeLog entry, fixes the formatting of the long ``nameoftype = ...''
line, and which incorporates my proposed fix of not caching the type
unless it has a name or tag name.  This latter check is still
necessary to account for error conditions in reading the type die.  If
you feel that you do not have time to do this, let me know, and I'll
put it together for you.

Kevin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]