public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-tromey-multi-inferior: psymtabs_addrmap is no longer relocated
@ 2010-10-01 19:35 tromey
  0 siblings, 0 replies; only message in thread
From: tromey @ 2010-10-01 19:35 UTC (permalink / raw)
  To: archer-commits

The branch, archer-tromey-multi-inferior has been updated
       via  1cea76036550e0ed565d56051e144ab0ba742300 (commit)
      from  60290abc6c78ebf98121adb8dc669605a2b3d0ed (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 1cea76036550e0ed565d56051e144ab0ba742300
Author: Tom Tromey <tromey@redhat.com>
Date:   Fri Oct 1 13:26:54 2010 -0600

    psymtabs_addrmap is no longer relocated

-----------------------------------------------------------------------

Summary of changes:
 gdb/dwarf2read.c |   23 ++++++-----------------
 gdb/objfiles.c   |    4 ----
 gdb/psymtab.c    |    8 +++++++-
 3 files changed, 13 insertions(+), 22 deletions(-)

First 500 lines of diff:
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 8964e45..6077312 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1909,8 +1909,7 @@ process_psymtab_comp_unit (struct objfile *objfile,
     /* Store the contiguous range if it is not empty; it can be empty for
        CUs with no code.  */
     addrmap_set_empty (OBJFILE_PSYMTABS_ADDRMAP (objfile),
-		       best_lowpc + baseaddr,
-		       best_highpc + baseaddr - 1, pst);
+		       best_lowpc, best_highpc - 1, pst);
 
   /* Check if comp unit has_children.
      If so, read the rest of the partial symbols from this comp unit.
@@ -2604,17 +2603,10 @@ add_partial_subprogram (struct partial_die_info *pdi,
           if (pdi->highpc > *highpc)
             *highpc = pdi->highpc;
 	  if (need_pc)
-	    {
-	      CORE_ADDR baseaddr;
-	      struct objfile *objfile = cu->objfile;
-
-	      baseaddr = ANOFFSET (OBJFILE_SECTION_OFFSETS (objfile),
-				   SECT_OFF_TEXT (objfile));
-	      addrmap_set_empty (OBJFILE_PSYMTABS_ADDRMAP (objfile),
-				 pdi->lowpc + baseaddr,
-				 pdi->highpc - 1 + baseaddr,
-				 cu->per_cu->psymtab);
-	    }
+	    addrmap_set_empty (OBJFILE_PSYMTABS_ADDRMAP (cu->objfile),
+			       pdi->lowpc,
+			       pdi->highpc - 1,
+			       cu->per_cu->psymtab);
           if (!pdi->is_declaration)
 	    /* Ignore subprogram DIEs that do not have a name, they are
 	       illegal.  Do not emit a complaint at this point, we will
@@ -4119,7 +4111,6 @@ dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
   int low_set;
   CORE_ADDR low = 0;
   CORE_ADDR high = 0;
-  CORE_ADDR baseaddr;
 
   found_base = cu->base_known;
   base = cu->base_address;
@@ -4148,8 +4139,6 @@ dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
 
   low_set = 0;
 
-  baseaddr = ANOFFSET (OBJFILE_SECTION_OFFSETS (objfile), SECT_OFF_TEXT (objfile));
-
   while (1)
     {
       CORE_ADDR range_beginning, range_end;
@@ -4191,7 +4180,7 @@ dwarf2_ranges_read (unsigned offset, CORE_ADDR *low_return,
 
       if (ranges_pst != NULL && range_beginning < range_end)
 	addrmap_set_empty (OBJFILE_PSYMTABS_ADDRMAP (objfile),
-			   range_beginning + baseaddr, range_end - 1 + baseaddr,
+			   range_beginning, range_end - 1,
 			   ranges_pst);
 
       /* FIXME: This is recording everything as a low-high
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index fdcd3f5..ef4d1e7 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -778,10 +778,6 @@ objfile_relocate1 (struct objfile *objfile,
     }
   }
 
-  if (OBJFILE_PSYMTABS_ADDRMAP (objfile))
-    addrmap_relocate (OBJFILE_PSYMTABS_ADDRMAP (objfile),
-		      ANOFFSET (delta, SECT_OFF_TEXT (objfile)));
-
   if (OBJFILE_SF (objfile))
     OBJFILE_SF (objfile)->qf->relocate (objfile, new_offsets, delta);
 
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 5bbf15a..75df7a8 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -227,7 +227,13 @@ find_pc_sect_psymtab (struct objfile *objfile, CORE_ADDR pc,
 
   if (OBJFILE_PSYMTABS_ADDRMAP (objfile) != NULL)
     {
-      pst = addrmap_find (OBJFILE_PSYMTABS_ADDRMAP (objfile), pc);
+      CORE_ADDR baseaddr, uncooked_pc;
+
+      baseaddr = ANOFFSET (OBJFILE_SECTION_OFFSETS (objfile),
+			   SECT_OFF_TEXT (objfile));
+      uncooked_pc = pc - baseaddr;
+
+      pst = addrmap_find (OBJFILE_PSYMTABS_ADDRMAP (objfile), uncooked_pc);
       if (pst != NULL)
 	{
 	  /* FIXME: addrmaps currently do not handle overlayed sections,


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-01 19:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-01 19:35 [SCM] archer-tromey-multi-inferior: psymtabs_addrmap is no longer relocated tromey

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).