This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
psim bug
- To: gdb-patches@sourceware.cygnus.com
- Subject: psim bug
- From: Daniel Kahlin <tlr@netinsight.se>
- Date: Fri, 20 Aug 1999 17:10:02 +0200
- 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