msp430-gdb prints the wrong variables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdb-msp430 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
{code}
#include <stdint.h>
#include <msp430g2433.h>
int process(unsigned int i)
{
}
int main()
{
unsigned int a = 0;
unsigned int b = 0;
unsigned int c = 0;
while (1)
{
b++;
process(b);
}
return 0;
}
{code}
Terminal 1:
{code}
msp430-gcc --version | head -1
msp430-gcc (GCC) 4.6.3 20120301 (mspgcc LTS 20120406 unpatched)
msp430-gdb --version | head -1
GNU gdb (GDB) 7.2
msp430-gcc -mmcu=msp430g2433 -g test_gdb.c -O0 -o test_gdb.elf
sudo mspdebug -d /dev/ttyUSB0 uif gdb
{code}
Terminal 2:
{code}
msp430-gdb
(gdb) target remote :2000
(gdb) file test_gdb.elf
(gdb) load test_gdb.elf
(gdb) break test_gdb.c:17
(gdb) monitor reset
(gdb) c
(gdb) print a
$1 = 1
(gdb) print b
$2 = 57438
(gdb) print c
$3 = 0
(gdb) c
(gdb) print a
$4 = 2
(gdb) print b
$5 = 57438
(gdb) print c
$6 = 0
{code}
WTF.... a != b