Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Kris Warkentin <kewarken@qnx.com>
Cc: Kevin Buettner <kevinb@redhat.com>,
	"Gdb@Sources.Redhat.Com" <gdb@sources.redhat.com>
Subject: Re: interesting solib-absolute-prefix problem
Date: Wed, 03 Dec 2003 21:26:00 -0000	[thread overview]
Message-ID: <20031203212628.GA2649@nevyn.them.org> (raw)
In-Reply-To: <06c101c3b9e3$5cd789d0$0202040a@catdog>

On Wed, Dec 03, 2003 at 04:21:06PM -0500, Kris Warkentin wrote:
> It's a bit screwy....you'll probably just have to trust me on it.  If it
> makes you feel better, I can give an example of the problem when doing
> remote debugging.  Say I'm in my homedir on a cygwin machine.  I export a
> CIFS dir /home/kewarken/foo where I build my app.  My remote machines
> homedir has foo mounted.  So /home/kewarken/foo/libmylib.so is exactly the
> same path on the local and the remote.  I've got solib-absolute-prefix set
> to find my system libs but I would hope that gdb would find libmylib.so
> properly because its location is the same on the host and target.  As it
> stands, it doesn't.
> 
> Would printing something like: "Warning: opening <path_to_lib> without using
> solib-absolute-prefix.  You may need to set solib-search-path." make it a
> little better?  I could also test for solib_absolute_prefix like so:
> 
> +   if (solib_absolute_prefix != NULL && found_file < 0 && (found_file =
> open (orig, O_RDONLY, 0)) > -1)
> +     temp_pathname = orig;

I've got to agree with Kevin - let's really not go down this path.

> It seems to me that if we accidentally opened up the wrong libc.so, for
> example, we would have some fairly catastrophic failure anyway.  You'd have

Yes, we do.  Usually, it involves GDB segfaulting.  That's why I don't
want us to do this :)

> to have a pretty seriously misconfigured system for that to happen,
> especially since this last ditch check happens after all other search paths
> are used.

For your users, since you autoset solib-absolute-prefix, yes you'd have
to have a pretty seriously misconfigured system.  For my users (at
MontaVista), the same thing, since we do something similar for cross
debugging.  For the average person who rolls a toolchain themselves,
however, this is an extremely common problem.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-12-03 21:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-03 19:47 Kris Warkentin
2003-12-03 20:35 ` Kevin Buettner
2003-12-03 21:20   ` Kris Warkentin
2003-12-03 21:26     ` Daniel Jacobowitz [this message]
2003-12-03 21:30       ` Kris Warkentin
2003-12-03 22:33 Michael Elizabeth Chastain
2003-12-03 22:53 ` Kris Warkentin

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=20031203212628.GA2649@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=kevinb@redhat.com \
    --cc=kewarken@qnx.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