From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: jan.kratochvil@redhat.com (Jan Kratochvil)
Cc: gdb-patches@sources.redhat.com, drow@false.org
Subject: Overlay support broken (Re: [patch] [2/2] Discontiguous PSYMTABs (psymtabs->symtabs by addrmap))
Date: Mon, 12 May 2008 22:24:00 -0000 [thread overview]
Message-ID: <200805121945.m4CJjdYd031485@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20080423213059.GC11894@host0.dyn.jankratochvil.net> from "Jan Kratochvil" at Apr 23, 2008 11:30:59 PM
Jan Kratochvil wrote:
> * symtab.c: Include "addrmap.h"
> (find_pc_sect_psymtab): Support reading the field PSYMTABS_ADDRMAP.
> Move the psymtab locator into ...
> (find_pc_sect_psymtab_closer): ... a new function.
It appears this change broke overlay support. In fact, it looks like the
main idea of this patch is fundamentally incompatible with overlays:
> + /* Map addresses to the entries of PSYMTABS. It would be more efficient to
> + have a map per the whole process but ADDRMAP cannot selectively remove
> + its items during FREE_OBJFILE. This mapping is already present even for
> + PARTIAL_SYMTABs which still have no corresponding full SYMTABs read. */
> +
> + struct addrmap *psymtabs_addrmap;
In the presence of overlays, a single address can map to *multiple* PSYMTABS
corresponding to multiple overlay segments optionally loaded at that address.
The old code chose between them using the "section" argument to
find_pc_sect_psymtab; it seems the new code just ignores this argument:
/* Try just the PSYMTABS_ADDRMAP mapping first as it has better granularity
than the later used TEXTLOW/TEXTHIGH one. */
ALL_OBJFILES (objfile)
if (objfile->psymtabs_addrmap != NULL)
{
struct partial_symtab *pst;
pst = addrmap_find (objfile->psymtabs_addrmap, pc);
if (pst != NULL)
{
/* We do not try to call FIND_PC_SECT_PSYMTAB_CLOSER as
PSYMTABS_ADDRMAP we used has already the best 1-byte
granularity and FIND_PC_SECT_PSYMTAB_CLOSER may mislead us into
a worse chosen section due to the TEXTLOW/TEXTHIGH ranges
overlap. */
return pst;
}
}
Any suggestions how to fix this?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2008-05-12 19:46 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-09 18:17 [patch] Parse DW_AT_ranges into PSYMTABS (for childless CU, for vDSO32) Jan Kratochvil
2007-10-09 18:22 ` Daniel Jacobowitz
2007-10-09 18:59 ` Jan Kratochvil
2007-10-09 19:13 ` Daniel Jacobowitz
2007-11-24 15:43 ` Jan Kratochvil
2007-11-25 14:48 ` Daniel Jacobowitz
2007-11-30 7:42 ` Vladimir Prus
2007-11-30 11:10 ` Jan Kratochvil
2007-11-30 14:56 ` Daniel Jacobowitz
2007-11-30 15:09 ` Jan Kratochvil
2007-12-01 0:55 ` Jim Blandy
2007-12-01 17:30 ` Joel Brobecker
2007-12-09 20:40 ` [patch] Discontiguous PSYMTABs [Re: [patch] Parse DW_AT_ranges into PSYMTABS (for childless CU, for vDSO32)] Jan Kratochvil
2007-12-10 0:21 ` [patch] Removal of the FIND_PC_SECT_PSYMTAB search [Re: [patch] Discontiguous PSYMTABs] Jan Kratochvil
2007-12-17 1:02 ` [patch] Discontiguous PSYMTABs [Re: [patch] Parse DW_AT_ranges into PSYMTABS (for childless CU, for vDSO32)] Daniel Jacobowitz
2007-12-17 1:03 ` Daniel Jacobowitz
2007-12-17 2:41 ` [patch] Discontiguous PSYMTABs Jan Kratochvil
2007-12-17 3:41 ` Daniel Jacobowitz
2008-04-23 22:15 ` [patch] [0/2] " Jan Kratochvil
2008-04-23 22:18 ` [patch] [1/2] Discontiguous PSYMTABs (partial DIEs base address) Jan Kratochvil
2008-05-01 19:43 ` Daniel Jacobowitz
2008-04-23 22:24 ` [patch] [2/2] Discontiguous PSYMTABs (psymtabs->symtabs by addrmap) Jan Kratochvil
2008-05-01 19:46 ` Daniel Jacobowitz
2008-05-04 17:38 ` Jan Kratochvil
2008-05-12 22:24 ` Ulrich Weigand [this message]
2008-05-12 22:37 ` Overlay support broken (Re: [patch] [2/2] Discontiguous PSYMTABs (psymtabs->symtabs by addrmap)) Michael Snyder
2008-05-13 1:39 ` Daniel Jacobowitz
2008-05-13 3:17 ` Jan Kratochvil
2008-05-13 15:37 ` Doug Evans
2008-05-13 15:42 ` Michael Snyder
2008-05-13 15:31 ` Doug Evans
2008-05-12 23:52 ` Jan Kratochvil
2008-05-13 18:45 ` Ulrich Weigand
2008-05-13 19:08 ` Pedro Alves
2008-05-13 19:01 ` Pedro Alves
2008-05-13 19:11 ` Michael Snyder
2008-05-15 16:39 ` Jan Kratochvil
2008-05-15 18:16 ` Ulrich Weigand
2008-05-15 18:44 ` Daniel Jacobowitz
2008-05-15 19:06 ` Ulrich Weigand
2008-05-16 18:32 ` Ulrich Weigand
2008-05-15 19:18 ` Michael Snyder
2008-04-23 21:31 ` [patch] Discontiguous PSYMTABs [Re: [patch] Parse DW_AT_ranges into PSYMTABS (for childless CU, for vDSO32)] Doug Evans
2008-04-23 21:31 ` Jan Kratochvil
2008-05-14 1:11 Overlay support broken (Re: [patch] [2/2] Discontiguous PSYMTABs (psymtabs->symtabs by addrmap)) Ulrich Weigand
2008-05-14 8:07 ` Pedro Alves
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=200805121945.m4CJjdYd031485@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jan.kratochvil@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