File: goroutine_start_line.star

package info (click to toggle)
delve 1.26.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,136 kB
  • sloc: ansic: 111,947; sh: 194; asm: 147; makefile: 43; python: 23
file content (12 lines) | stat: -rw-r--r-- 444 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
def command_goroutine_start_line(args):
	"prints the line of source code that started each currently running goroutine"
	gs = goroutines().Goroutines
	for g in gs:
		if g.StartLoc.File != "":
			line = read_file(g.StartLoc.File).splitlines()[g.StartLoc.Line-1].strip()
		else:
			line = "<nothing>"
		print(g.ID, "\t", g.StartLoc.File + ":" + str(g.StartLoc.Line), "\t", line)

def main():
	dlv_command("config alias goroutine_start_line gsl")