8294920: Missing SP value in Linux x86_32 thread context

Reviewed-by: cjplummer, sspitsyn
This commit is contained in:
Aleksey Shipilev 2022-10-07 18:23:16 +00:00
parent 4cbac40de9
commit fe7a4617fe

@ -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 class LinuxX86JavaThreadPDAccess implements JavaThreadPDAccess {
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) {