Add support for Windows.

Fixes #198.
This commit is contained in:
Luke Hoban
2016-01-14 21:26:54 -08:00
parent 98ae684096
commit bddb712a6b
26 changed files with 964 additions and 28 deletions

View File

@ -3,6 +3,7 @@ package line
import (
"debug/elf"
"debug/macho"
"debug/pe"
"os"
"os/exec"
"path/filepath"
@ -24,6 +25,12 @@ func grabDebugLineSection(p string, t *testing.T) []byte {
data, _ := ef.Section(".debug_line").Data()
return data
}
pf, err := pe.NewFile(f)
if err == nil {
data, _ := pf.Section(".debug_line").Data()
return data
}
mf, _ := macho.NewFile(f)
data, _ := mf.Section("__debug_line").Data()