Daniel Jacobowitz wrote: > > On Sun, Nov 03, 2002 at 08:54:12AM -0500, Stuart Hughes wrote: > > Hi, > > > > I'm trying to use gdb/gdbserver to debug a strong-arm target. I'm > > having problems with single stepping. If I try to step into the loop > > shown below, it simply runs on printing all 10 loop iterations. > > > > for ( i = 0; i < 10 ; i++ ) { > > printf("loop count = %d\n", i); > > } > > [snip] > > > > Has anyone else seen this problem ? Does anyone know of a work around, > > or a fix ? > > gdbserver doesn't implement software single step; the connected GDB > client handles it. You may want to 'set debug target 1' and 'set debug > remote 1', and watch for differences. Hi Daniel, I've investigted this further. I tried the things you suggested, but I'm finding it hard to correlate the output from the native sesion and the remote session. The native session outputs a a huge slew of output before it first manages to control the inferior. Looking at the ouput from the remote debugging session, it looks okay, it seems to insert a breakpoint (I'm guessing, it writes 10300be5 to the point to break at), and then continues. When the inferior wakes up, it sends back a 'T' packet. I thought this should stop gdb, but it doesn't. The session carries on, without any user intervention until the end of the program. The code of the loop looks like this when disassembled: for ( i = 0; i < 10 ; i++ ) { 84b0: e3a03000 mov r3, #0 ; 0x0 84b4: e50b3010 str r3, [fp, -#16] 84b8: e51b3010 ldr r3, [fp, -#16] 84bc: e3530009 cmp r3, #9 ; 0x9 84c0: da000000 ble 84c8 84c4: ea000006 b 84e4 printf("loop count = %d\n", i); 84c8: e59f0020 ldr r0, [pc, #32] ; 84f0 84cc: e51b1010 ldr r1, [fp, -#16] 84d0: ebffff9d bl 834c <_init+0x64> 84d4: e51b3010 ldr r3, [fp, -#16] 84d8: e2833001 add r3, r3, #1 ; 0x1 84dc: e50b3010 str r3, [fp, -#16] 84e0: eafffff4 b 84b8 } I've attached the output captured from 'set debug remote' FYI. Do you have any suggestions where I could look next ?? Regards, Stuart