From: Joel Brobecker <brobecker@adacore.com>
To: Luis Machado <lgustavo@codesourcery.com>
Cc: "'gdb-patches@sourceware.org'" <gdb-patches@sourceware.org>
Subject: Re: checked in: Re: RFC: solib.c:solib_map_sections so->so_name clobbering
Date: Mon, 28 Oct 2013 11:39:00 -0000 [thread overview]
Message-ID: <20131028113939.GC3066@adacore.com> (raw)
In-Reply-To: <526C7E65.6050308@codesourcery.com>
> >My suspicion is that the bfd_open callback takes care of the path
> >translation, so the backend was allowing itself to defer it. I am
> >not sure how difficult it would be to move that part to each backend.
> >
> >Reverting the patch would be a real issue, because it would mean
> >that any given solib backend cannot set the so_name, and commands
> >such as "info shared" would print a bogus shared library name.
> >Nevertheless, if we did revert it, I think we can work around
> >the issue by using the same trick as the one we used for the 7.6
> >branch IIRC.
>
> I wouldn't say this is critical, just a slight change from an
> undocumented direction we've been following. :-)
I had the weekend to think about it some more. To me, the most
important aspect is that the output in GDB/MI is now incorrect,
not just confusing. So I think something should be done about it,
and sooner rather than later.
At the moment, the approach I dislike the least is to revert
my patch, and let the couple of solib backends (darwin, AIX)
fix up the BFD filename, the same way we did on the gdb-7.6
branch:
http://www.sourceware.org/ml/gdb-patches/2013-03/msg01084.html
This fixup is what we used to do in the past, except that we were
leaking memory. It's possible to do the same without the memory leak,
thanks to a suggestion from Tom. It sounds contradictory to be
suggesting this, since I think this is clearly a step in the wrong
direction (making the semantics of that field a little iffy, since
time-sensitive), but seems like an acceptable compromise between amount
of work vs severity of the problem.
The alternative would be, I think, to make sure that the various
solib backends set the so_name properly. I'm not sure whether
that's actually possible. I would need to study the framework
a little longer, but lack the time at the moment.
Other thoughts/suggestions?
Thanks,
--
Joel
next prev parent reply other threads:[~2013-10-28 11:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-26 2:30 Luis Machado
2013-10-26 2:35 ` Luis Machado
2013-10-26 4:29 ` Joel Brobecker
2013-10-27 2:46 ` Luis Machado
2013-10-28 11:39 ` Joel Brobecker [this message]
2013-12-04 16:59 ` Joel Brobecker
2013-12-15 10:02 ` Joel Brobecker
-- strict thread matches above, loose matches on Subject: below --
2012-07-18 19:34 [PATCH 02/10] clean up allocation of bfd filenames Tom Tromey
2013-03-28 12:29 ` RFC: solib.c:solib_map_sections so->so_name clobbering (was: [PATCH 02/10] clean up allocation of bfd filenames) Joel Brobecker
2013-03-28 19:12 ` RFC: solib.c:solib_map_sections so->so_name clobbering Tom Tromey
2013-03-29 1:59 ` Joel Brobecker
2013-04-11 4:03 ` checked in: " Joel Brobecker
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=20131028113939.GC3066@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.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