diff --git a/dwarf.go b/dwarf.go index d2c0c93..2929092 100644 --- a/dwarf.go +++ b/dwarf.go @@ -95,7 +95,7 @@ func commonStringCheck(fh fileHandler, entry *dwarf.Entry) (string, dwarfwalkSta return "", dwStop } var addr uint64 - if fh.getFileInfo().WordSize == 4 { // 32 bits + if fh.getFileInfo().WordSize == intSize32 { addr = uint64(fh.getFileInfo().ByteOrder.Uint32(location[1:])) } else { addr = fh.getFileInfo().ByteOrder.Uint64(location[1:]) @@ -108,7 +108,7 @@ func commonStringCheck(fh fileHandler, entry *dwarf.Entry) (string, dwarfwalkSta off := addr - sectionBase r := bytes.NewReader(data[off:]) var stringData [2]uint64 - if fh.getFileInfo().WordSize == 4 { // 32 bits + if fh.getFileInfo().WordSize == intSize32 { var stringData32 [2]uint32 err = binary.Read(r, fh.getFileInfo().ByteOrder, &stringData32) if err != nil {