watchpoints and gdb/gdbserver on embedded arm

I have a Cirrus EDB9302 development board running the Cirrus supplied linux (kernel 2.4.21-rmk1-crus1.4.3). I am trying to test remote debugging but can't get watchpoints to work. I have made a simple hello world program that does several printfs and increments a variable in between the printfs.

I can set regular breakpoints and step and print variables without any problems but when I set a watchpoint and continue usually nothing happens. I say usually because on occasion I do break when the test variable is incremented. But only the first time, never a second time.

Does anybody have any information about using watchpoints and remote debugging using gdbserver/gdb?

I am using gdb-5.3 (supplied by Cirrus) and am running arm-linux-gdb (also supplied by Cirrus) on Mandrake 10.1

My program: ============================================ #include

int testVar;

void incTestVar( int amount ) { testVar += amount; }

int main( int argc, char* argv ) { testVar = 0;

fprintf( stderr, "Welcome to my test program\n" );

++testVar;

fprintf( stderr, "I am testing watchpoints\n" );

incTestVar( 5 );

fprintf( stderr, "Isn't that magical?\n" );

--testVar;

return 0; }

============================================

And I am compiling it like this: arm-linux-gcc -g -o gdbtest gdbtest.c

Chris

Reply to
Ultra5
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.