Mercurial > hg > graal-jvmci-8
comparison agent/src/share/classes/sun/jvm/hotspot/code/RuntimeStub.java @ 3908:7588156f5cf9
7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244)
Reviewed-by: kvn
author | never |
---|---|
date | Mon, 05 Sep 2011 17:09:05 -0700 |
parents | c18cbe5936b8 |
children |
comparison
equal
deleted
inserted
replaced
3907:7b5c767f229c | 3908:7588156f5cf9 |
---|---|
28 import sun.jvm.hotspot.debugger.*; | 28 import sun.jvm.hotspot.debugger.*; |
29 import sun.jvm.hotspot.runtime.*; | 29 import sun.jvm.hotspot.runtime.*; |
30 import sun.jvm.hotspot.types.*; | 30 import sun.jvm.hotspot.types.*; |
31 | 31 |
32 public class RuntimeStub extends CodeBlob { | 32 public class RuntimeStub extends CodeBlob { |
33 private static CIntegerField callerMustGCArgumentsField; | |
34 | |
33 static { | 35 static { |
34 VM.registerVMInitializedObserver(new Observer() { | 36 VM.registerVMInitializedObserver(new Observer() { |
35 public void update(Observable o, Object data) { | 37 public void update(Observable o, Object data) { |
36 initialize(VM.getVM().getTypeDataBase()); | 38 initialize(VM.getVM().getTypeDataBase()); |
37 } | 39 } |
38 }); | 40 }); |
39 } | 41 } |
40 | 42 |
41 private static void initialize(TypeDataBase db) { | 43 private static void initialize(TypeDataBase db) { |
42 Type type = db.lookupType("RuntimeStub"); | 44 Type type = db.lookupType("RuntimeStub"); |
45 callerMustGCArgumentsField = type.getCIntegerField("_caller_must_gc_arguments"); | |
43 | 46 |
44 // FIXME: add any needed fields | 47 // FIXME: add any needed fields |
45 } | 48 } |
46 | 49 |
47 public RuntimeStub(Address addr) { | 50 public RuntimeStub(Address addr) { |
50 | 53 |
51 public boolean isRuntimeStub() { | 54 public boolean isRuntimeStub() { |
52 return true; | 55 return true; |
53 } | 56 } |
54 | 57 |
58 public boolean callerMustGCArguments() { | |
59 return callerMustGCArgumentsField.getValue(addr) != 0; | |
60 } | |
61 | |
62 | |
55 public String getName() { | 63 public String getName() { |
56 return "RuntimeStub: " + super.getName(); | 64 return "RuntimeStub: " + super.getName(); |
57 } | 65 } |
58 } | 66 } |