This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Add missing baseaddr in dwarf2read.c


Hi.

I was getting
"warning: (Internal error: pc 0x93a0 in read in psymtab, but not in symtab.)"
and traced it to an oversight in dwarf2read.c:add_partial_subprogram.
[target = android]

The real addresses were 0xafe0XXXX but the addresses in the addrmap were
off by baseaddr = 0xafe00000.

[tested on android and amd64-linux, no regressions]

Ok to check in?

2010-03-01  Doug Evans  <dje@google.com>

	* dwarf2read.c (add_partial_subprogram): Add missing baseaddr to
	lowpc,highpc args to addrmap_set_empty.

Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.356
diff -u -p -r1.356 dwarf2read.c
--- dwarf2read.c	15 Feb 2010 20:48:57 -0000	1.356
+++ dwarf2read.c	2 Mar 2010 06:02:39 -0000
@@ -2695,7 +2695,8 @@ add_partial_subprogram (struct partial_d
 	      baseaddr = ANOFFSET (objfile->section_offsets,
 				   SECT_OFF_TEXT (objfile));
 	      addrmap_set_empty (objfile->psymtabs_addrmap,
-				 pdi->lowpc, pdi->highpc - 1,
+				 pdi->lowpc + baseaddr,
+				 pdi->highpc - 1 + baseaddr,
 				 cu->per_cu->psymtab);
 	    }
           if (!pdi->is_declaration)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]