Commit 2fe2aa09 authored by David Chase's avatar David Chase

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: 's avatarHeschi Kreinick <heschi@google.com>
parent d278f093
...@@ -143,14 +143,21 @@ func TestNexting(t *testing.T) { ...@@ -143,14 +143,21 @@ func TestNexting(t *testing.T) {
optFlags += " -l" optFlags += " -l"
} }
subTest(t, debugger+"-dbg", "hist", dbgFlags) moreargs := []string{}
subTest(t, debugger+"-dbg", "scopes", dbgFlags) if !*useDelve && (runtime.GOOS == "darwin" || runtime.GOOS == "windows") {
subTest(t, debugger+"-dbg", "i22558", dbgFlags) // gdb and lldb on Darwin do not deal with compressed dwarf.
// also, Windows.
moreargs = append(moreargs, "-ldflags=-compressdwarf=false")
}
subTest(t, debugger+"-dbg", "hist", dbgFlags, moreargs...)
subTest(t, debugger+"-dbg", "scopes", dbgFlags, moreargs...)
subTest(t, debugger+"-dbg", "i22558", dbgFlags, moreargs...)
subTest(t, debugger+"-dbg-race", "i22600", dbgFlags, "-race") subTest(t, debugger+"-dbg-race", "i22600", dbgFlags, append(moreargs, "-race")...)
optSubTest(t, debugger+"-opt", "hist", optFlags) optSubTest(t, debugger+"-opt", "hist", optFlags, moreargs...)
optSubTest(t, debugger+"-opt", "scopes", optFlags) optSubTest(t, debugger+"-opt", "scopes", optFlags, moreargs...)
} }
// subTest creates a subtest that compiles basename.go with the specified gcflags and additional compiler arguments, // subTest creates a subtest that compiles basename.go with the specified gcflags and additional compiler arguments,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment