improve package gdebug; add more unit testing case for package gdb

This commit is contained in:
John
2020-04-27 17:56:04 +08:00
parent 9480ffcdc0
commit cf1d3d3d2b
3 changed files with 32 additions and 6 deletions

View File

@ -58,6 +58,10 @@ func StackWithFilters(filters []string, skip ...int) string {
pc, file, line, ok = runtime.Caller(i)
}
if ok {
// Filter empty file.
if file == "" {
continue
}
// GOROOT filter.
if goRootForFilter != "" &&
len(file) >= len(goRootForFilter) &&