*: FreeBSD initial support (#1480)

* FreeBSD initial support

* first code review fixes

* regs slice upd

* execPtraceFunc wrap

* disabled concurrency tests
fixed kill() issue

* disabled concurrency tests
fixed kill() issue

* cleanup vendor related code

* cleanup ptrace calls

* vendoring latest changes

* Revert "vendoring latest changes"

This reverts commit 833cb87b

* vendoring latest changes

* requested changes
This commit is contained in:
Robert Ayrapetyan
2019-07-12 18:28:04 -07:00
committed by Derek Parker
parent 114b76aefc
commit df65be43ae
24 changed files with 1352 additions and 20 deletions

View File

@ -424,6 +424,9 @@ func TestScopePrefix(t *testing.T) {
}
func TestOnPrefix(t *testing.T) {
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
const prefix = "\ti: "
test.AllowRecording(t)
withTestTerminal("goroutinestackprog", t, func(term *FakeTerminal) {
@ -443,7 +446,7 @@ func TestOnPrefix(t *testing.T) {
out := strings.Split(outstr, "\n")
for i := range out {
if !strings.HasPrefix(out[i], "\ti: ") {
if !strings.HasPrefix(out[i], prefix) {
continue
}
id, err := strconv.Atoi(out[i][len(prefix):])
@ -477,6 +480,9 @@ func TestNoVars(t *testing.T) {
}
func TestOnPrefixLocals(t *testing.T) {
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
const prefix = "\ti: "
test.AllowRecording(t)
withTestTerminal("goroutinestackprog", t, func(term *FakeTerminal) {
@ -496,7 +502,7 @@ func TestOnPrefixLocals(t *testing.T) {
out := strings.Split(outstr, "\n")
for i := range out {
if !strings.HasPrefix(out[i], "\ti: ") {
if !strings.HasPrefix(out[i], prefix) {
continue
}
id, err := strconv.Atoi(out[i][len(prefix):])
@ -532,6 +538,9 @@ func countOccurrences(s string, needle string) int {
}
func TestIssue387(t *testing.T) {
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
// a breakpoint triggering during a 'next' operation will interrupt it
test.AllowRecording(t)
withTestTerminal("issue387", t, func(term *FakeTerminal) {