]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix runtime.Breakpoint for ARM
authorShenghou Ma <minux.ma@gmail.com>
Tue, 24 Apr 2012 15:19:44 +0000 (23:19 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Tue, 24 Apr 2012 15:19:44 +0000 (23:19 +0800)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6100053

src/pkg/runtime/asm_arm.s

index 489a3474001e095dcb0df5ccdc17e00cae1f0f79..74be9cead9897cbd8b49070e6ed968af28739fba 100644 (file)
@@ -60,7 +60,9 @@ TEXT _rt0_arm(SB),7,$-4
        MOVW    R0, (R1)        // fail hard
 
 TEXT runtime·breakpoint(SB),7,$0
-       // no breakpoint yet; let program exit
+       // gdb won't skip this breakpoint instruction automatically,
+       // so you must manually "set $pc+=4" to skip it and continue.
+       WORD    $0xe1200071 // BKPT 0x0001
        RET
 
 TEXT runtime·asminit(SB),7,$0