changeset 15851:94a2df2f8e58

preserve context in Debug.forceLog
author Lukas Stadler <lukas.stadler@oracle.com>
date Thu, 22 May 2014 14:04:55 +0200
parents 9ce2ca72efef
children 8b8208aa2f44
files graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java	Thu May 22 14:04:55 2014 +0200
+++ b/graal/com.oracle.graal.debug/src/com/oracle/graal/debug/Debug.java	Thu May 22 14:04:55 2014 +0200
@@ -277,7 +277,11 @@
     }
 
     public static Scope forceLog() {
-        return Debug.sandbox("forceLog", new DelegatingDebugConfig().enable(LOG).enable(LOG_METHOD));
+        ArrayList<Object> context = new ArrayList<>();
+        for (Object obj : context()) {
+            context.add(obj);
+        }
+        return Debug.sandbox("forceLog", new DelegatingDebugConfig().enable(LOG).enable(LOG_METHOD), context.toArray());
     }
 
     /**