Mercurial > hg > graal-compiler
comparison agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgCDebugger.java @ 10302:78332b46e604
6313816: SA: jstack -m fails on Win32 : UnalignedAddressException
Reviewed-by: sla, poonam
author | kevinw |
---|---|
date | Thu, 16 May 2013 12:40:27 +0100 |
parents | c18cbe5936b8 |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
10301:17db82f22f1e | 10302:78332b46e604 |
---|---|
26 | 26 |
27 import java.io.*; | 27 import java.io.*; |
28 import java.util.*; | 28 import java.util.*; |
29 import sun.jvm.hotspot.debugger.*; | 29 import sun.jvm.hotspot.debugger.*; |
30 import sun.jvm.hotspot.debugger.cdbg.*; | 30 import sun.jvm.hotspot.debugger.cdbg.*; |
31 import sun.jvm.hotspot.debugger.cdbg.basic.x86.*; | |
32 import sun.jvm.hotspot.debugger.cdbg.basic.amd64.*; | |
33 import sun.jvm.hotspot.debugger.x86.*; | 31 import sun.jvm.hotspot.debugger.x86.*; |
34 import sun.jvm.hotspot.debugger.amd64.*; | 32 import sun.jvm.hotspot.debugger.amd64.*; |
33 import sun.jvm.hotspot.debugger.windows.x86.*; | |
34 import sun.jvm.hotspot.debugger.windows.amd64.*; | |
35 import sun.jvm.hotspot.utilities.AddressOps; | 35 import sun.jvm.hotspot.utilities.AddressOps; |
36 | 36 |
37 class WindbgCDebugger implements CDebugger { | 37 class WindbgCDebugger implements CDebugger { |
38 // FIXME: think about how to make this work in a remote debugging | 38 // FIXME: think about how to make this work in a remote debugging |
39 // scenario; who should keep open DLLs? Need local copies of these | 39 // scenario; who should keep open DLLs? Need local copies of these |
73 X86ThreadContext context = (X86ThreadContext) thread.getContext(); | 73 X86ThreadContext context = (X86ThreadContext) thread.getContext(); |
74 Address ebp = context.getRegisterAsAddress(X86ThreadContext.EBP); | 74 Address ebp = context.getRegisterAsAddress(X86ThreadContext.EBP); |
75 if (ebp == null) return null; | 75 if (ebp == null) return null; |
76 Address pc = context.getRegisterAsAddress(X86ThreadContext.EIP); | 76 Address pc = context.getRegisterAsAddress(X86ThreadContext.EIP); |
77 if (pc == null) return null; | 77 if (pc == null) return null; |
78 return new X86CFrame(this, ebp, pc); | 78 return new WindowsX86CFrame(dbg, ebp, pc); |
79 } else if (dbg.getCPU().equals("amd64")) { | 79 } else if (dbg.getCPU().equals("amd64")) { |
80 AMD64ThreadContext context = (AMD64ThreadContext) thread.getContext(); | 80 AMD64ThreadContext context = (AMD64ThreadContext) thread.getContext(); |
81 Address rbp = context.getRegisterAsAddress(AMD64ThreadContext.RBP); | 81 Address rbp = context.getRegisterAsAddress(AMD64ThreadContext.RBP); |
82 if (rbp == null) return null; | 82 if (rbp == null) return null; |
83 Address pc = context.getRegisterAsAddress(AMD64ThreadContext.RIP); | 83 Address pc = context.getRegisterAsAddress(AMD64ThreadContext.RIP); |
84 if (pc == null) return null; | 84 if (pc == null) return null; |
85 return new AMD64CFrame(this, rbp, pc); | 85 return new WindowsAMD64CFrame(dbg, rbp, pc); |
86 } else { | 86 } else { |
87 // unsupported CPU! | 87 // unsupported CPU! |
88 return null; | 88 return null; |
89 } | 89 } |
90 } | 90 } |