We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C:\dev\go\src\debug\pe>go version go version devel +d5994f4 Sun Jul 5 22:07:46 2015 +0000 windows/386 C:\dev\go\src\debug\pe>git diff diff --git a/src/debug/pe/file_test.go b/src/debug/pe/file_test.go index 0d73969..aa03459 100644 --- a/src/debug/pe/file_test.go +++ b/src/debug/pe/file_test.go @@ -5,7 +5,12 @@ package pe import ( + "io/ioutil" + "os" + "os/exec" + "path/filepath" "reflect" + "runtime" "testing" ) @@ -241,3 +246,37 @@ func TestOpenFailure(t *testing.T) { t.Errorf("open %s: succeeded unexpectedly", filename) } } + +func TestDWARF(t *testing.T) { + if runtime.GOOS != "windows" { + t.Skip("Skipping windows only test.") + } + + tmpdir, err := ioutil.TempDir("", "TestDWARF") + if err != nil { + t.Fatal("TempDir failed: ", err) + } + defer os.RemoveAll(tmpdir) + + prog := ` +package main +func main() { +} +` + src := filepath.Join(tmpdir, "a.go") + exe := filepath.Join(tmpdir, "a.exe") + err = ioutil.WriteFile(src, []byte(prog), 0644) + output, err := exec.Command("go", "build", "-o", exe, src).CombinedOutput() + if err != nil { + t.Fatalf("building test executable failed: %s %s", err, string(output)) + } + + f, err := Open(exe) + if err != nil { + t.Fatal(err) + } + _, err = f.DWARF() + if err != nil { + t.Fatal(err) + } +} C:\dev\go\src\debug\pe>go test -v -run=DWARF === RUN TestDWARF --- FAIL: TestDWARF (3.80s) file_test.go:280: decoding dwarf section info at offset 0x1e7ff: underflow FAIL exit status 1 FAIL debug/pe 3.905s C:\dev\go\src\debug\pe>
Alex
The text was updated successfully, but these errors were encountered:
CL https://golang.org/cl/11950 mentions this issue.
Sorry, something went wrong.
315e5c9
No branches or pull requests
Alex
The text was updated successfully, but these errors were encountered: