Highlight error and add a hint to ptrace_scope
One reason why the call to gdb might fail is that /proc/sys/kernel/yama/ptrace_scope is set to 1. We now give an corresponding hint when gdb fails.
This commit is contained in:
parent
afe46025f5
commit
647e704fed
@ -115,5 +115,6 @@ func extractOffsetWithGdb(pid int, t *testing.T) (offset uint64, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
return 0, fmt.Errorf("Symbol not found with gdb")
|
||||
return 0, fmt.Errorf("[31mSymbol not found with gdb.[0m\n" +
|
||||
"[35mMaybe /proc/sys/kernel/yama/ptrace_scope must be set to 0? Or try to run the test as root![0m")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user