1
0
mirror of https://github.com/golang/go synced 2024-11-23 16:40:03 -07:00

cmd/compile: avoid compressed dwarf when testing for gdb on OSX

Until we figure out how to deal with gdb on Darwin (doesn't
read compressed DWARF from binaries), avoid compressing
DWARF in that case so that the test will still yield meaningful
results.

This is also reported to be a problem for Windows.

Problem also exists for lldb, but this test doesn't check
lldb.

Updates #25925

Change-Id: I85c0e5db75f3329957290500626a3ac7f078f608
Reviewed-on: https://go-review.googlesource.com/124712
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
David Chase 2018-07-18 11:23:56 -04:00
parent d278f09333
commit 2fe2aa0983

View File

@ -143,14 +143,21 @@ func TestNexting(t *testing.T) {
optFlags += " -l"
}
subTest(t, debugger+"-dbg", "hist", dbgFlags)
subTest(t, debugger+"-dbg", "scopes", dbgFlags)
subTest(t, debugger+"-dbg", "i22558", dbgFlags)
moreargs := []string{}
if !*useDelve && (runtime.GOOS == "darwin" || runtime.GOOS == "windows") {
// gdb and lldb on Darwin do not deal with compressed dwarf.
// also, Windows.
moreargs = append(moreargs, "-ldflags=-compressdwarf=false")
}
subTest(t, debugger+"-dbg-race", "i22600", dbgFlags, "-race")
subTest(t, debugger+"-dbg", "hist", dbgFlags, moreargs...)
subTest(t, debugger+"-dbg", "scopes", dbgFlags, moreargs...)
subTest(t, debugger+"-dbg", "i22558", dbgFlags, moreargs...)
optSubTest(t, debugger+"-opt", "hist", optFlags)
optSubTest(t, debugger+"-opt", "scopes", optFlags)
subTest(t, debugger+"-dbg-race", "i22600", dbgFlags, append(moreargs, "-race")...)
optSubTest(t, debugger+"-opt", "hist", optFlags, moreargs...)
optSubTest(t, debugger+"-opt", "scopes", optFlags, moreargs...)
}
// subTest creates a subtest that compiles basename.go with the specified gcflags and additional compiler arguments,