From: Thiago Jung Bauermann <bauerman@br.ibm.com>
To: Mathieu Lacage <mathieu.lacage@gmail.com>
Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
Subject: Re: impossible to resolve symbols in same binary loaded twice with dlmopen
Date: Wed, 26 Jan 2011 10:52:00 -0000 [thread overview]
Message-ID: <1296007016.17530.17.camel@hactar> (raw)
In-Reply-To: <AANLkTik0zptGgNwwVk3M7yzJ_YHohs5NBHg3U-JiYj_m@mail.gmail.com>
Hi,
On Thu, 2011-01-20 at 13:05 +0100, Mathieu Lacage wrote:
> On Sun, Jul 25, 2010 at 14:24, Mathieu Lacage <mathieu.lacage@gmail.com> wrote:
>
> >> Anyway, AFAICT, your patch won't break anything, and it is a step in the
> >> right direction. So, please check it in.
> >
> > I don't have commit rights, and, really, it's better for you if I don't :)
>
> Would someone commit this patch for me ? It's been a couple of months now...
I'm not a maintainer, but given that the patch was already approved, I
committed the following.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
2011-01-25 Mathieu Lacage <mathieu.lacage@inria.fr>
PR/symtab 11766:
* gdb/objfiles.h (struct objfile) <addr_low>: New field.
* gdb/solib.c (solib_read_symbols): Check for addr_low in
equality test for objfile, initialize addr_low if needed.
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index c44517f..759c2f9 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -194,6 +194,8 @@ struct objfile
char *name;
+ CORE_ADDR addr_low;
+
/* Some flag bits for this objfile. */
unsigned short flags;
diff --git a/gdb/solib.c b/gdb/solib.c
index 909a23b..6748d87 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -638,7 +638,8 @@ solib_read_symbols (struct so_list *so, int flags)
/* Have we already loaded this shared object? */
ALL_OBJFILES (so->objfile)
{
- if (strcmp (so->objfile->name, so->so_name) == 0)
+ if (strcmp (so->objfile->name, so->so_name) == 0
+ && so->objfile->addr_low == so->addr_low)
break;
}
if (so->objfile != NULL)
@@ -648,6 +649,7 @@ solib_read_symbols (struct so_list *so, int flags)
so->sections_end);
so->objfile = symbol_file_add_from_bfd (so->abfd,
flags, sap, OBJF_SHARED);
+ so->objfile->addr_low = so->addr_low;
free_section_addr_info (sap);
}
next prev parent reply other threads:[~2011-01-26 1:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 18:49 Mathieu Lacage
2010-07-08 20:32 ` Tom Tromey
2010-07-09 11:37 ` Mathieu Lacage
2010-07-09 11:42 ` Mathieu Lacage
2010-07-20 19:38 ` Tom Tromey
2010-07-25 12:25 ` Mathieu Lacage
2011-01-20 14:51 ` Mathieu Lacage
2011-01-26 10:52 ` Thiago Jung Bauermann [this message]
2011-01-28 11:10 ` Tom Tromey
2011-01-29 10:32 ` Thiago Jung Bauermann
2011-01-31 17:50 ` Tom Tromey
2010-07-08 15:59 Mathieu Lacage
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=1296007016.17530.17.camel@hactar \
--to=bauerman@br.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=mathieu.lacage@gmail.com \
--cc=tromey@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).