Public bug reported:

{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

** Affects: gdb-msp430 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1829690

Title:
  msp430-gdb prints the wrong variables

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb-msp430/+bug/1829690/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to