aboutsummaryrefslogtreecommitdiff
path: root/src/debug/pe
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2017-05-11 11:55:59 +1000
committerAlex Brainman <alex.brainman@gmail.com>2017-05-15 06:16:19 +0000
commit1d44c4e37847a975c40f8f15df7914939b540f6b (patch)
treed416defb6f356671a89c3cc1d134295ce9e63f13 /src/debug/pe
parentfca6ad45e25647d8d156a8ecd29137000408efeb (diff)
downloadgo-1d44c4e37847a975c40f8f15df7914939b540f6b.tar.xz
cmd/link: actually generate .debug_gdb_scripts section on windows
Adjust finddebugruntimepath to look for runtime/debug.go file instead of runtime/runtime.go. This actually finds runtime.GOMAXPROCS in every Go executable (including windows). I also included "-Wl,-T,fix_debug_gdb_scripts.ld" parameter to gcc invocation on windows to work around gcc bug (see #20183 for details). This CL only fixes windows -buildmode=exe, buildmode=c-archive is still broken. Thanks to Egon Elbre and Nick Clifton for investigation. Fixes #20183 Fixes #20218 Change-Id: I5369a4db3913226aef3d9bd6317446856b0a1c34 Reviewed-on: https://go-review.googlesource.com/43331 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/debug/pe')
-rw-r--r--src/debug/pe/file_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/debug/pe/file_test.go b/src/debug/pe/file_test.go
index 100516f0ba..8645d676b7 100644
--- a/src/debug/pe/file_test.go
+++ b/src/debug/pe/file_test.go
@@ -363,6 +363,16 @@ func testDWARF(t *testing.T, linktype int) {
}
defer f.Close()
+ var foundDebugGDBScriptsSection bool
+ for _, sect := range f.Sections {
+ if sect.Name == ".debug_gdb_scripts" {
+ foundDebugGDBScriptsSection = true
+ }
+ }
+ if !foundDebugGDBScriptsSection {
+ t.Error(".debug_gdb_scripts section is not found")
+ }
+
d, err := f.DWARF()
if err != nil {
t.Fatal(err)