Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Kris Warkentin" <kewarken@qnx.com>
To: "Kevin Buettner" <kevinb@redhat.com>, <gdb@sources.redhat.com>
Subject: Re: solib-search-path not honoured after program start
Date: Wed, 19 Feb 2003 19:58:00 -0000	[thread overview]
Message-ID: <0a6101c2d851$4fb04d60$0202040a@catdog> (raw)
In-Reply-To: <1030219194420.ZM9267@localhost.localdomain>

> I think this so.
> 
> At first glance, the problem seems to be that update_solib_list() only
> considers mapping newly found shared libraries and not ones that were
> previously known, but which could not be found.
> 
> It might not be too hard to change things so that it attempts to map
> previously unmappable libraries, but I wonder what should happen to
> already mapped and/or loaded shared libraries when solib-search-path
> is changed.  If changing the search path (or the absolute prefix)
> would cause different libraries to be found (than were found
> previously), should the old ones be unmapped/discarded?  (I suspect
> the answer is yes.)
> 
> If so, maybe the right way to fix this problem is to have the
> "set solib-search-path" and "set solib-absolute-prefix" commands
> simply unload all known shared libraries and then invoke solib_add().

What do you think of this?

$ cvs diff -c solib.c
Index: solib.c
===================================================================
RCS file: /cvs/src/src/gdb/solib.c,v
retrieving revision 1.53
diff -c -r1.53 solib.c
*** solib.c     18 Jan 2003 15:55:52 -0000      1.53
--- solib.c     19 Feb 2003 19:57:38 -0000
***************
*** 431,436 ****
--- 431,445 ----
        struct so_list *i = inferior;
        struct so_list **i_link = &inferior;

+       /* if this lib hasn't been read, remove it from gdb's list so
+          that we can try again */
+       if (!gdb->abfd && !gdb->objfile){
+         *gdb_link = gdb->next;
+         free_so (gdb);
+         gdb = *gdb_link;
+         continue;
+       }
+
        /* Check to see whether the shared object *gdb also appears in
         the inferior's current list.  */
        while (i)


  reply	other threads:[~2003-02-19 19:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-19 19:04 Kris Warkentin
2003-02-19 19:44 ` Kevin Buettner
2003-02-19 19:58   ` Kris Warkentin [this message]
2003-02-19 21:11     ` Kevin Buettner
2003-02-19 21:31       ` Kris Warkentin
2003-02-20 18:27       ` Kevin Buettner

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='0a6101c2d851$4fb04d60$0202040a@catdog' \
    --to=kewarken@qnx.com \
    --cc=gdb@sources.redhat.com \
    --cc=kevinb@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