Mercurial > hg > truffle
comparison agent/src/share/classes/sun/jvm/hotspot/debugger/linux/amd64/LinuxAMD64CFrame.java @ 6163:b87e5a681416
6310967: SA: jstack -m produce failures in output
Summary: While looking for the sender frame check that the frame pointer should not be less than the stack pointer.
Reviewed-by: dholmes, sla
author | poonam |
---|---|
date | Thu, 14 Jun 2012 02:12:46 -0700 |
parents | c18cbe5936b8 |
children | 651919d134f7 |
comparison
equal
deleted
inserted
replaced
6129:4d399f013e5a | 6163:b87e5a681416 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
23 */ | 23 */ |
24 | 24 |
25 package sun.jvm.hotspot.debugger.linux.amd64; | 25 package sun.jvm.hotspot.debugger.linux.amd64; |
26 | 26 |
27 import sun.jvm.hotspot.debugger.*; | 27 import sun.jvm.hotspot.debugger.*; |
28 import sun.jvm.hotspot.debugger.amd64.*; | |
28 import sun.jvm.hotspot.debugger.linux.*; | 29 import sun.jvm.hotspot.debugger.linux.*; |
29 import sun.jvm.hotspot.debugger.cdbg.*; | 30 import sun.jvm.hotspot.debugger.cdbg.*; |
30 import sun.jvm.hotspot.debugger.cdbg.basic.*; | 31 import sun.jvm.hotspot.debugger.cdbg.basic.*; |
31 | 32 |
32 final public class LinuxAMD64CFrame extends BasicCFrame { | 33 final public class LinuxAMD64CFrame extends BasicCFrame { |
49 | 50 |
50 public Address localVariableBase() { | 51 public Address localVariableBase() { |
51 return rbp; | 52 return rbp; |
52 } | 53 } |
53 | 54 |
54 public CFrame sender() { | 55 public CFrame sender(ThreadProxy thread) { |
55 if (rbp == null) { | 56 AMD64ThreadContext context = (AMD64ThreadContext) thread.getContext(); |
57 Address rsp = context.getRegisterAsAddress(AMD64ThreadContext.RSP); | |
58 | |
59 if ( (rbp == null) || rbp.lessThan(rsp) ) { | |
56 return null; | 60 return null; |
57 } | 61 } |
58 | 62 |
59 Address nextRBP = rbp.getAddressAt( 0 * ADDRESS_SIZE); | 63 Address nextRBP = rbp.getAddressAt( 0 * ADDRESS_SIZE); |
60 if (nextRBP == null) { | 64 if (nextRBP == null) { |