Commit ca8aac69 authored by Christian Himpel's avatar Christian Himpel Committed by Ian Lance Taylor

runtime: gdb support: use parse_and_eval to get the goroutine id

This enables to loop over some goroutines, e.g. to print the
backtrace of goroutines 1 to 9:

        set $i = 1
        while $i < 10
        printf "backtrace of goroutine %d:\n", $i
        goroutine $i++ bt
        end

R=lvd, lvd
CC=golang-dev
https://golang.org/cl/6843071
parent 8f3b7033
......@@ -375,6 +375,7 @@ class GoroutineCmd(gdb.Command):
def invoke(self, arg, from_tty):
goid, cmd = arg.split(None, 1)
goid = gdb.parse_and_eval(goid)
pc, sp = find_goroutine(int(goid))
if not pc:
print "No such goroutine: ", goid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment