aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/defs_windows_386.go
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2015-02-12 12:14:02 +1100
committerAlex Brainman <alex.brainman@gmail.com>2015-04-09 00:57:28 +0000
commite0d9342da713cc3cd4243e1c940851a7518d7a95 (patch)
tree14aa396e87a4be7842aaf0075ac2a0a0f9489544 /src/runtime/defs_windows_386.go
parent00bc19e996253afd5a3ed763d7a575f56c07d7db (diff)
downloadgo-e0d9342da713cc3cd4243e1c940851a7518d7a95.tar.gz
go-e0d9342da713cc3cd4243e1c940851a7518d7a95.zip
runtime: use (*context) ip, setip, sp and setsp everywhere on windows
Also move dumpregs into defs_windows_*.go. Change-Id: Ic077d7dbb133c7b812856e758d696d6fed557afd Reviewed-on: https://go-review.googlesource.com/4650 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/defs_windows_386.go')
-rw-r--r--src/runtime/defs_windows_386.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/runtime/defs_windows_386.go b/src/runtime/defs_windows_386.go
index c860f74a3f..bac6ce78ce 100644
--- a/src/runtime/defs_windows_386.go
+++ b/src/runtime/defs_windows_386.go
@@ -107,6 +107,22 @@ func (c *context) sp() uintptr { return uintptr(c.esp) }
func (c *context) setip(x uintptr) { c.eip = uint32(x) }
func (c *context) setsp(x uintptr) { c.esp = uint32(x) }
+func dumpregs(r *context) {
+ print("eax ", hex(r.eax), "\n")
+ print("ebx ", hex(r.ebx), "\n")
+ print("ecx ", hex(r.ecx), "\n")
+ print("edx ", hex(r.edx), "\n")
+ print("edi ", hex(r.edi), "\n")
+ print("esi ", hex(r.esi), "\n")
+ print("ebp ", hex(r.ebp), "\n")
+ print("esp ", hex(r.esp), "\n")
+ print("eip ", hex(r.eip), "\n")
+ print("eflags ", hex(r.eflags), "\n")
+ print("cs ", hex(r.segcs), "\n")
+ print("fs ", hex(r.segfs), "\n")
+ print("gs ", hex(r.seggs), "\n")
+}
+
type overlapped struct {
internal uint32
internalhigh uint32