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:
Özgür Kesim 2020-01-16 16:02:04 +01:00
parent afe46025f5
commit 647e704fed

View File

@ -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("Symbol not found with gdb.\n" +
"Maybe /proc/sys/kernel/yama/ptrace_scope must be set to 0? Or try to run the test as root!")
}