Esempio n. 1
0
func TestAllgs(t *testing.T) {
	table, err := symme.Table()
	if err != nil {
		t.Fatal(err)
	}

	unsafer.AllGs(func(g *unsafer.Goroutine) {
		fileGo, lineGo, _ := table.PCToLine(uint64(g.Gopc))
		fileF, lineF, _ := table.PCToLine(uint64(g.Startpc))
		fmt.Printf("%s:%d ->\n\t%s:%d\n", fileGo, lineGo, fileF, lineF)
	})
}
Esempio n. 2
0
func inittable() {
	tableOnce.Do(func() {
		var err error
		table, err = symme.Table()
		if err != nil {
			panic(err)
		}
		syms, err = symme.Symbols()
		if err != nil {
			panic(err)
		}
	})
}