Created
November 7, 2012 13:50
-
-
Save astaxie/4031691 to your computer and use it in GitHub Desktop.
run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) run | |
Starting program: /home/xiemengjun/gdbfile | |
Starting main | |
count: 0 | |
count: 1 | |
count: 2 | |
count: 3 | |
count: 4 | |
count: 5 | |
count: 6 | |
count: 7 | |
count: 8 | |
count: 9 | |
[LWP 2771 exited] | |
[Inferior 1 (process 2771) exited normally] | |
(gdb) b 23 | |
Breakpoint 1 at 0x400d8d: file /home/xiemengjun/gdbfile.go, line 23. | |
(gdb) run | |
Starting program: /home/xiemengjun/gdbfile | |
Starting main | |
[New LWP 3284] | |
[Switching to LWP 3284] | |
Breakpoint 1, main.main () at /home/xiemengjun/gdbfile.go:23 | |
23 fmt.Println("count:", count) | |
(gdb) list | |
18 fmt.Println(msg) | |
19 bus := make(chan int) | |
20 msg = "starting a gofunc" | |
21 go counting(bus) | |
22 for count := range bus { | |
23 fmt.Println("count:", count) | |
24 } | |
25 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(gdb) info goroutines
3 waiting runtime.gosched
4 runnable runtime.gosched