aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal
diff options
context:
space:
mode:
authorHiroshi Ioka <hirochachacha@gmail.com>2017-10-02 08:17:15 +0900
committerKeith Randall <khr@golang.org>2017-11-10 20:11:20 +0000
commitdc3a4e4bca1eb0fed3304d22875ca26964091e82 (patch)
treed84ec501f6841bdb3aa4835664deea4b6dfd7630 /src/cmd/internal
parent3af20c06fe206ff92a8111fe230deb0170dac33d (diff)
downloadgo-dc3a4e4bca1eb0fed3304d22875ca26964091e82.tar.xz
cmd/objdump: pass the correct execution mode to x86asm.Decode in disasm_x86 on 386
Fixes #22093 Fixes #19988 Change-Id: Ibd8ec89e091fd527f363999e484676931d7aa6e2 Reviewed-on: https://go-review.googlesource.com/67450 Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/internal')
-rw-r--r--src/cmd/internal/objfile/disasm.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/internal/objfile/disasm.go b/src/cmd/internal/objfile/disasm.go
index 18cc4e6fff..c486016d6c 100644
--- a/src/cmd/internal/objfile/disasm.go
+++ b/src/cmd/internal/objfile/disasm.go
@@ -304,7 +304,7 @@ func disasm_amd64(code []byte, pc uint64, lookup lookupFunc, _ binary.ByteOrder)
}
func disasm_x86(code []byte, pc uint64, lookup lookupFunc, arch int) (string, int) {
- inst, err := x86asm.Decode(code, 64)
+ inst, err := x86asm.Decode(code, arch)
var text string
size := inst.Len
if err != nil || size == 0 || inst.Op == 0 {