[coldfire-gnu-discuss] GDB freeze when steping into a loop with P&E BDM
Carlos O'Donell
carlos at codesourcery.com
Wed Jun 1 15:52:43 UTC 2011
On 5/23/2011 5:52 AM, Stephane Franck Rey wrote:
> Then defined the target connection :
>
> ******************************************************************
> (gdb) target remote | m68k-elf-sprite pe://USBMultilink m51ac128cevb
> Remote debugging using | m68k-elf-sprite pe://USBMultilink m51ac128cevb
> m68k-elf-sprite: Opening P&E USBMultilink port 1 (USB1 : USB-ML-12 Rev C (PE5516
> 318))
> m68k-elf-sprite: Target reset
> 0x00000000 in _ftext ()
> ******************************************************************
>
>
> I've set some breakpoints lines 66 and line 68 :
>
> ******************************************************************
> (gdb) info break
> Num Type Disp Enb Address What
> 1 breakpoint keep y 0x00000626 in main at ../main.c:66
> 2 breakpoint keep y 0x0000065a in main at ../main.c:68
> ******************************************************************
>
>
> And ran the program :
>
> ******************************************************************
> (gdb) c
> Continuing.
> Note: automatically using hardware breakpoints for read-only addresses.
> ******************************************************************
>
>
> After a while nothing is happening I press CTRL+C :
If you wait a *very* long time does the program run to completion?
For example if you wait several hours does it complete?
Is it simply that the debug interface is being incredibly slow?
Could you confirm that please?
> ******************************************************************
> Program received signal SIGINT, Interrupt.
> 0x00000620 in main () at ../main.c:57
> 57 for (i=1; i<50000; i++)
> (gdb) display i
> 1: i = 24028
> ******************************************************************
> Several tests have shown it halts for random value of I (24028, 37406, ...)
>
> Then I continue the execution until it stops definitely on line 68 :
>
> ******************************************************************
> (gdb) c
> Continuing.
>
> Breakpoint 1, main () at ../main.c:66
> 66 PTFD&= ~PTFD_PTFD0_MASK;;
> 1: i = 50000
> (gdb) next
> 67 PTFD |= PTFD_PTFD1_MASK ;;
> 1: i = 50000
> (gdb) next
>
> Breakpoint 2, main () at ../main.c:68
> 68 for (i=1; i<40000; i++){asm ("nop");};
> 1: i = 50000
> (gdb)
> ^C
Another question, did your CTRL+C come *before* or *after* Breakpoint 2
was hit?
If the program isn't running CTRL+C won't do anything.
Cheers,
Carlos.
--
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos at codesourcery.com
+1 (613) 963 1026
More information about the coldfire-gnu-discuss
mailing list