comparison agent/src/share/classes/sun/jvm/hotspot/code/RicochetBlob.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 a80577f854f9
children
comparison
equal deleted inserted replaced
3907:7b5c767f229c 3908:7588156f5cf9
39 } 39 }
40 }); 40 });
41 } 41 }
42 42
43 private static void initialize(TypeDataBase db) { 43 private static void initialize(TypeDataBase db) {
44 // Type type = db.lookupType("RicochetBlob"); 44 Type type = db.lookupType("RicochetBlob");
45 45
46 // FIXME: add any needed fields 46 bounceOffsetField = type.getCIntegerField("_bounce_offset");
47 exceptionOffsetField = type.getCIntegerField("_exception_offset");
47 } 48 }
49
50 private static CIntegerField bounceOffsetField;
51 private static CIntegerField exceptionOffsetField;
48 52
49 public RicochetBlob(Address addr) { 53 public RicochetBlob(Address addr) {
50 super(addr); 54 super(addr);
51 } 55 }
52 56
53 public boolean isRicochetBlob() { 57 public boolean isRicochetBlob() {
54 return true; 58 return true;
55 } 59 }
60
61 public Address bounceAddr() {
62 return codeBegin().addOffsetTo(bounceOffsetField.getValue(addr));
63 }
64
65 public boolean returnsToBounceAddr(Address pc) {
66 Address bouncePc = bounceAddr();
67 return (pc.equals(bouncePc) || pc.addOffsetTo(Frame.pcReturnOffset()).equals(bouncePc));
68 }
69
56 } 70 }