I've got a strange error where it appears as though memory is fine, and then I go one instruction more, and it's an invalid pointer.

void filebase::ReOpen(bool ReadOnly) // after a file has been opened then closed can be reopened
{
const char *p = PathName->GetData();

If I break at this point and examine PathName, (which contains char *Data) PathName is at a valid address, the Data pointer is valid, and the data it's pointing to is correct.
Variables                        Value                 Location
this: filebase *                0x0002f5e0        0x00036664
   PathName : clstring *    0x00037C38  0x0002F5EA
   Data : char *            "go.prm"             0x00037C3C

As assembler the code is:
const char *p = PathName->GetData();
000628AA: 206E0008        movea.l  8(a6),a0
000628AE: 2F28000C        move.l   12(a0),-(a7)
000628B2: 600A bra.s filebase::ReOpen(short)+0x6 (0x628be); 0x000628be
000628B4: 2000            move.l   d0,d0
000628B6: 2000            move.l   d0,d0
000628B8: 2000            move.l   d0,d0
000628BA: 2000            move.l   d0,d0
000628BC: 2000            move.l   d0,d0
000628BE: 4EADF700 jsr -2304(a5) <----------------------- HERE!!!
000628C2: 2448            movea.l  a0,a2
Open(p,ReadOnly);

As soon as I step into PathName, the data is all screwed up, with odd address values.

I'm getting stuck, any ideas?


Chris Bruner
Compulife Software Inc.
==============================================

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to