From: Kevin Buettner <kevinb@redhat.com>
To: Elena Zannoni <ezannoni@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] solib-svr4.c fetch link map address
Date: Wed, 02 Oct 2002 10:28:00 -0000 [thread overview]
Message-ID: <1021002172805.ZM23452@localhost.localdomain> (raw)
In-Reply-To: Elena Zannoni <ezannoni@redhat.com> "[RFA] solib-svr4.c fetch link map address" (Oct 1, 10:28pm)
On Oct 1, 10:28pm, Elena Zannoni wrote:
> + discard_cleanups (old_chain);
> + return lm;
> + }
> + }
> + /* Not the file we wanted, continue checking. */
> + lm = extract_address (objfile_lm_info.lm + lmo->l_next_offset,
> + lmo->l_next_size);
> + discard_cleanups (old_chain);
> + }
Why are the cleanups being discarded? Won't this result in a memory
leak?
Another concern is that there appears to be some duplication of code
between svr4_current_sos() and the function that you've just written.
I'm wondering if some sort of factoring could be done to minimize
duplication.
Finally, I'm curious about how often we'll be fetching the link
map address. Is it the case that it'll be fetched once (per
objfile) and never fetched again? Or will it be fetched repeatedly?
If it's the former, I think your approach is fine. If the latter, we
should consider saving the link map address so that it can be supplied
to glibc without having to read the target.
Kevin
next prev parent reply other threads:[~2002-10-02 17:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-01 19:30 Elena Zannoni
2002-10-01 21:52 ` Daniel Jacobowitz
2002-10-02 6:50 ` Elena Zannoni
2002-10-02 10:28 ` Kevin Buettner [this message]
2002-10-02 11:42 ` Elena Zannoni
2002-10-02 18:45 ` Elena Zannoni
2002-10-02 20:24 ` Kevin Buettner
2002-10-02 21:28 ` Daniel Jacobowitz
2002-10-21 11:43 ` Elena Zannoni
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=1021002172805.ZM23452@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.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