Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Berlin <dberlin@redhat.com>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: Elena Zannoni <ezannoni@redhat.com>,
	Jim Wilson <wilson@cygnus.com>, Pete Wyckoff <pw@osc.edu>,
	gdb@sources.redhat.com
Subject: Re: [Linux-ia64] Re: gdb null ptr
Date: Mon, 06 Nov 2000 21:13:00 -0000	[thread overview]
Message-ID: <m3bsvsxt40.fsf@dan2.cygnus.com> (raw)
In-Reply-To: <1001107010812.ZM16938@ocotillo.lan>

Kevin Buettner <kevinb@cygnus.com> writes:

> [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.

This may be a better idea, it depends on how people want the patches
broken up, I guess.

It might make more sense to revert the old one, then submit the
patch to re-add caching of types, symbols, and psymbols (each seperately).
As opposed to submitting a patch to fix the caching of types, then add
symbols and psymbols caching.
Makes no difference to me, might seem more logical to someone else.

It was something I had intended to do a long while ago, as it's been
pretty far along for a long while (formatting and changelog entries have
to be finished, and some testcases worked up, but the code itself,
seems to work fine), but i've been sidetracked.


> 
> > 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++.

Yup. I've got some comments in the patch that adds similar caching for
symbols and psymbols on why it works, especially since the fact that
it works for statics is dependent on the way the dwarf2 reader works
right now (In particular it resets the cached hash tables at the
beginning of each CU, so you end up with at most one of each
type/symbol/psymbol of a given mangled name per file. ). I also added
warnings and notes in the approriate places saying "If you change the
dwarf2 reader in such a way that it no longer resets the hash tables
at the beginning of each symtab, you'll need to change this code".

> 
> > 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.

I plan on it. It's on my todo list for tomorrow. 

>  This latter check is still
> necessary to account for error conditions in reading the type die. 

Yup.

> you feel that you do not have time to do this, let me know, and I'll
> put it together for you.

I should, my todo list for tomorrow includes this patch, and the partial
symbol lookup fix.

The only reason i haven't submitted it, the changelogs, with an RFA in
the subject, is because i wanted to make sure there was nothing
egregiously wrong with it that anyone else could see before I polish
it and submit.
--Dan

> 
> Kevin


  reply	other threads:[~2000-11-06 21:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200011032142.NAA27103@wilson.cygnus.com>
     [not found] ` <1001103230254.ZM14396@ocotillo.lan>
2000-11-03 19:21   ` Daniel Berlin
2000-11-06 17:08     ` Kevin Buettner
2000-11-06 21:13       ` Daniel Berlin [this message]
     [not found] <npofzr8lj2.fsf@zwingli.cygnus.com>
2000-11-07 15:40 ` Jim Wilson
2000-11-09 14:03 David B Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3bsvsxt40.fsf@dan2.cygnus.com \
    --to=dberlin@redhat.com \
    --cc=ezannoni@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=kevinb@cygnus.com \
    --cc=pw@osc.edu \
    --cc=wilson@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox