mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
debug/pe, cgo: add windows support
R=rsc, mattn CC=golang-dev https://golang.org/cl/1976045
This commit is contained in:
parent
e198a5086a
commit
035696c59a
10 changed files with 407 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ import (
|
|||
"debug/dwarf"
|
||||
"debug/elf"
|
||||
"debug/macho"
|
||||
"debug/pe"
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/ast"
|
||||
|
|
@ -504,7 +505,9 @@ func (p *Package) gccDebug(stdin []byte) *dwarf.Data {
|
|||
var err os.Error
|
||||
if f, err = elf.Open(gccTmp); err != nil {
|
||||
if f, err = macho.Open(gccTmp); err != nil {
|
||||
fatal("cannot parse gcc output %s as ELF or Mach-O object", gccTmp)
|
||||
if f, err = pe.Open(gccTmp); err != nil {
|
||||
fatal("cannot parse gcc output %s as ELF or Mach-O or PE object", gccTmp)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue