Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Add missing baseaddr in dwarf2read.c
@ 2010-03-02  6:54 Doug Evans
  2010-03-02 15:06 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2010-03-02  6:54 UTC (permalink / raw)
  To: gdb-patches

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)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] Add missing baseaddr in dwarf2read.c
  2010-03-02  6:54 [RFA] Add missing baseaddr in dwarf2read.c Doug Evans
@ 2010-03-02 15:06 ` Daniel Jacobowitz
  2010-03-02 17:32   ` Doug Evans
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2010-03-02 15:06 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On Mon, Mar 01, 2010 at 10:54:40PM -0800, Doug Evans wrote:
> 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.

Whoops.  Pity we don't turn on the relevant compiler warning,
baseaddr is never read.  This is OK.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] Add missing baseaddr in dwarf2read.c
  2010-03-02 15:06 ` Daniel Jacobowitz
@ 2010-03-02 17:32   ` Doug Evans
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Evans @ 2010-03-02 17:32 UTC (permalink / raw)
  To: gdb-patches

On Tue, Mar 2, 2010 at 7:06 AM, Daniel Jacobowitz <dan@codesourcery.com> wrote:
> On Mon, Mar 01, 2010 at 10:54:40PM -0800, Doug Evans wrote:
>> 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.
>
> Whoops.  Pity we don't turn on the relevant compiler warning,
> baseaddr is never read.  This is OK.

Thanks.
I'll add it to the 7.1 branch too.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-02 17:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-02  6:54 [RFA] Add missing baseaddr in dwarf2read.c Doug Evans
2010-03-02 15:06 ` Daniel Jacobowitz
2010-03-02 17:32   ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox