Steve Underwood <ste...@coppice.org> writes:

Hi!

SU> >1. Commands break...if..., watch..., break...commands...end
SU> >are carried out as simple breakpoints (break...). It is correct?
SU> >
SU> What do you neab by a simle breakpoint? When using msp430-gdbproxy the 
hardware breakpoint functions of the MSP430 are
SU> used.

For example main.c:
-------------
#include <io.h>

void LedFlash();


int main(void)
{
  int count1=0;
  int count2=0;
  int volatile count=0;

  P1DIR=P1DIR|0x01;

  while(1)
    {
      count=count1++;
      LedFlash();
      count=count2++;
    }

  return 0;
}

---------------


Example 1.
(gdb) break 16
(gdb)

/it works always (simle breakpoint)/

Example 2.
(gdb) break 16 if count==10
(gdb)
 
/it works, when the condition is satisfied (count==10)./

Example 3.
(gdb) break 16
(gdb) commands
>>print count
>>cont
>>end

/When works, the command is carried out./


The example 1 works for me, and examples 2 and 3 - do not work
(more precisely work as simple breakpoint). 

SU> >2.
SU> >
SU> >>msp430-gcc -mmcu=msp430x149 -D_GNU_ASSEMBLER_ -nostartfiles
SU>  -nostandartlibs -g fet140_1.S -o fet140_1
                    ^^^^^^
SU> >>
SU> >
SU> >
SU> >>msp430-gdb fet140_1
SU> >>
SU> >GNU gdb 6.0
SU> >Copyright 2003 Free Software Foundation, Inc.
SU> >.....
SU> >This GDB was configured as "--host=i686-pc-cygwin --target=msp430"...
SU> >0x0000ffff in ?? ()
SU> >(no debugging symbols found)...
SU> > ^^^^^^^^^^^^^^^^^^^^^^^^^^ :(
SU> >(gdb)
SU> >
SU> >Why?
SU> >
SU> You didn't put "-g" in the gcc command.

This option (-g) is in the GCC command. 

-- 
Thanks,

Vladimir Makarov.


Reply via email to