From: Tom Tromey <tromey@redhat.com>
To: dje@google.com (Doug Evans)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] Fission patch 1/2
Date: Fri, 13 Apr 2012 17:12:00 -0000 [thread overview]
Message-ID: <87iph3y39k.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20120413072548.EAA5F2461B3@ruffy.mtv.corp.google.com> (Doug Evans's message of "Fri, 13 Apr 2012 00:25:48 -0700 (PDT)")
>>>>> "Doug" == Doug Evans <dje@google.com> writes:
Doug> +void
Doug> +nullify_cleanup (struct cleanup *cleanup)
Doug> +{
Doug> + struct cleanup *c;
Doug> +
Doug> + for (c = cleanup_chain; c->next != cleanup; c = c->next)
Doug> + continue;
Doug> + c->function = null_cleanup;
Doug> +}
I'd rather not have a general facility for this kind of thing in
cleanups. I think it makes them even harder to reason about. Instead
the problem can be solved locally by making the particular cleanup work
conditionally.
Doug> + FIXME: As an implementation detail between our callers and us,
Doug> + USE_EXISTING_CU and KEEP are OK. But bubbling them up into their callers
Doug> + isn't as clean as I'd like. Having more callers with good names
Doug> + may be the way to go. */
I'd just remove it.
Doug> + if (free_cu_cleanup != NULL)
This sort of check is dangerous. A call to make_cleanup can return NULL
in some situations -- not this particular situation, but if someone
later modifies the code this can break.
It is better to keep a separate flag.
Doug> + The CU "per_cu" pointer is needed because offset alone is not enough to
Doug> + uniquely identify the type. A file may have multiple .debug_types sections,
Doug> + or the type may come from a DWO file.
I wonder if this fixes PR 13627.
Tom
next prev parent reply other threads:[~2012-04-13 17:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 7:44 Doug Evans
2012-04-13 17:12 ` Tom Tromey [this message]
2012-04-13 17:30 ` Doug Evans
2012-04-13 18:11 ` Tom Tromey
2012-04-13 19:46 ` Doug Evans
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=87iph3y39k.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=dje@google.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