From fe7a4617fec4d9358b8ce08d74f82714198867d1 Mon Sep 17 00:00:00 2001 From: Aleksey Shipilev Date: Fri, 7 Oct 2022 18:23:16 +0000 Subject: [PATCH] 8294920: Missing SP value in Linux x86_32 thread context Reviewed-by: cjplummer, sspitsyn --- .../hotspot/runtime/linux_x86/LinuxX86JavaThreadPDAccess.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_x86/LinuxX86JavaThreadPDAccess.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_x86/LinuxX86JavaThreadPDAccess.java index e788bb7cdeb7d..6224de03141a6 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_x86/LinuxX86JavaThreadPDAccess.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/linux_x86/LinuxX86JavaThreadPDAccess.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -116,7 +116,7 @@ public void printInfoOn(Address threadAddr, PrintStream tty) { public Address getLastSP(Address addr) { ThreadProxy t = getThreadProxy(addr); X86ThreadContext context = (X86ThreadContext) t.getContext(); - return context.getRegisterAsAddress(X86ThreadContext.ESP); + return context.getRegisterAsAddress(X86ThreadContext.SP); } public ThreadProxy getThreadProxy(Address addr) {