[Fwd: psim bug]

Daniel Kahlin tlr@netinsight.se
Fri Aug 20 08:27:00 GMT 1999


Oops, forgot to mention:
The bug is atleast present in gdb-4.17 and gdb-4.18,
probably 'insight' aswell.
/Daniel 

-------- Original Message --------
Subject: psim bug
Date: Fri, 20 Aug 1999 17:10:02 +0200
From: Daniel Kahlin <tlr@netinsight.se>
To: gdb-patches@sourceware.cygnus.com
CC: "seved.torstendahl@netinsight.se"
<seved.torstendahl@netinsight.se>,ace@netinsight.se

Hi,

BUG:
  When loading sections using 'psim' they incorrectly get placed at their
  respective VMA's instead of their LMA's.  This makes debugging of romable
  code impossible, because crt0.S will break when it tries to copy the
  .data section into ram.

FIX:
  Always load sections to their LMA.
  If the LMA and the VMA differ, mark the LMA area read-only, and
  allocate the VMA area filling it with zeroes.
  
This should make romable powerpc code correctly debugable using gdb.

Regards,
/Daniel Kahlin


sim/ppc/ChangeLog:
------------------------------------------------------------------------
1999-08-20  Daniel Kahlin  <tlr@netinsight.se>

        * hw_init.c (update_for_binary_section):  Now correctly loads
	sections to their LMA instead of their VMA. If the LMA and VMA
	differ both are allocated, the LMA area marked read only, and
	the VMA area zeroed.
        

------------------------------------------------------------------------
$ cd sim/ppc
$ diff -c3p hw_init.c.orig hw_init.c
<...output attached...>
$
------------------------------------------------------------------------

-- 
Daniel Kahlin <daniel.kahlin@netinsight.se>
Hardware System Designer
Net Insight AB
URL: http://www.netinsight.se/
patch.gz



More information about the Gdb-patches mailing list