Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
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: Sat, 26 Oct 2013 04:29:00 -0000	[thread overview]
Message-ID: <20131026042902.GE4769@adacore.com> (raw)
In-Reply-To: <526B2A53.7080905@codesourcery.com>

> >So it looks like we've lost information about the shared library's path
> >on the host, which may not be a big deal for CLI GDB, but may confuse
> >consumers of MI output.

Agreed.

Can you also check the output of "info shared" in GDB/CLI mode?
I suspect that you might have a change in behavior there as well.
Whether this change is actually a Good Thing or not, is unclear,
as the manual does not say whether the names are expected to be
host-side paths, or target-side paths.

> >I gave this a quick thought, but reverting the change seemed like the
> >most obvious solution.
> >
> >But since this change affects darwin, maybe Joel has a different idea?

This would also affect AIX.

It might probably need more thought, but at first sight, I am wondering
whether the real issue is that the solib backend created an entry
where "so_name" does not match the field description:

    /* Shared object file name, expanded to something GDB can open.  */

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.

-- 
Joel


  reply	other threads:[~2013-10-26  4:29 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 [this message]
2013-10-27  2:46     ` Luis Machado
2013-10-28 11:39       ` Joel Brobecker
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=20131026042902.GE4769@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