提交 ab1614e2 编写于 作者: P poonam

6812971: SA: re-attaching to process fails

Summary: After attaching, de-attaching SA from a process, the second time attach() call fails. This happens because in VM.initialize(), Universe does not get re-initialized before it is accessed.
Reviewed-by: swamyv
上级 0edc156b
...@@ -342,11 +342,13 @@ public class VM { ...@@ -342,11 +342,13 @@ public class VM {
throw new RuntimeException("Attempt to initialize VM twice"); throw new RuntimeException("Attempt to initialize VM twice");
} }
soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian()); soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian());
debugger.putHeapConst(Universe.getHeapBase(), soleInstance.getHeapOopSize(),
soleInstance.logMinObjAlignmentInBytes);
for (Iterator iter = vmInitializedObservers.iterator(); iter.hasNext(); ) { for (Iterator iter = vmInitializedObservers.iterator(); iter.hasNext(); ) {
((Observer) iter.next()).update(null, null); ((Observer) iter.next()).update(null, null);
} }
debugger.putHeapConst(Universe.getHeapBase(), soleInstance.getHeapOopSize(),
soleInstance.logMinObjAlignmentInBytes);
} }
/** This is used by the debugging system */ /** This is used by the debugging system */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册