Skip to main content
Visitor II
July 23, 2004
Question

debugging problem

  • July 23, 2004
  • 2 replies
  • 652 views
Posted on July 23, 2004 at 05:12

debugging problem

    This topic has been closed for replies.

    2 replies

    shinnlinAuthor
    Visitor II
    July 21, 2004
    Posted on July 21, 2004 at 09:07

    I wrote a program as this :

    void main(void)

    {

    int i;

    int array[10];

    for (i=0; i

    array[i] = i+1;

    while (1);

    }

    when I watch the variable 'array' in the while loop,

    the displayed data in the watch window is shift, like this:

    array [0x2000FA74]

    [0] 0x00000002

    [1] 0x00000003

    [2] 0x00000004

    [3] 0x00000005

    [4] 0x00000006

    [5] 0x00000007

    [6] 0x00000008

    [7] 0x00000009

    [8] 0x0000000A

    [9] 0xE59FF018

    the value at [0x2000FA70] is 0x00000001

    if I look at the dsm code, the start address of 'array' is

    [0x2000FA70], not [0x2000FA74].

    any one know what's going on with this ?

    shinnlinAuthor
    Visitor II
    July 21, 2004