From: Doug Evans <dje@google.com>
To: Michael Eager <eager@eagerm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit] dwarf2read.c (load_partial_dies): Change condition to assert.
Date: Sat, 07 Apr 2012 22:14:00 -0000 [thread overview]
Message-ID: <CADPb22Sg+9Y+N2h-iTB+HUD3wT1S7T+9_N_bzMdT2QX68xDK8w@mail.gmail.com> (raw)
In-Reply-To: <4F80B598.9050606@eagerm.com>
On Sat, Apr 7, 2012 at 2:46 PM, Michael Eager <eager@eagerm.com> wrote:
> age_cached_comp_units() is called to age the CU cache and free up
> cached CUs which were not recently used. This happens while reading
> symbols for a different CU.
Right, but such calls won't happen between the time cu->per_cu is set
and load_partial_dies is called (unless I've missed something of
course).
>> My reading of all of the callers says it can't happen (modulo bugs of
>> course).
>> I could have missed something of course (in which case let's get
>> something added to the testsuite to exercise the appropriate code
>> path).
>
>
> My concern is that unless the per_cu data was loaded by one of the
> immediate callers, it may have been flushed.
I welcome someone reviewing the callers and showing what I missed.
I know of no case where a struct dwarf2_cu exists without its
corresponding struct dwarf2_per_cu_data.
> I'm not sure I can create a reasonable test case for this problem.
> I ran into this with a large program with many CUs printing a struct
> which took several pages to print. The per_cu data disappeared in
> the middle of printing the struct.
I think we need to be careful with terminology here (gdb sometimes
doesn't make this easy though).
There's per_cu and there's per_cu->cu.
per_cu (i.e. struct dwarf2_per_cu_data) does not get flushed or aged.
per_cu->cu (i.e. struct dwarf2_cu) does.
In your case did a struct dwarf2_per_cu_data disappear, or was it per_cu->cu?
I have no doubt there are bugs in this area, btw.
next prev parent reply other threads:[~2012-04-07 22:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-07 19:39 Doug Evans
2012-04-07 20:40 ` Michael Eager
2012-04-07 20:49 ` Doug Evans
2012-04-07 21:46 ` Michael Eager
2012-04-07 22:14 ` Doug Evans [this message]
2012-04-07 22:27 ` Michael Eager
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=CADPb22Sg+9Y+N2h-iTB+HUD3wT1S7T+9_N_bzMdT2QX68xDK8w@mail.gmail.com \
--to=dje@google.com \
--cc=eager@eagerm.com \
--cc=gdb-patches@sourceware.org \
/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