Change code contains function to allow a return address just after the last instruction
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 25 Aug 2010 12:51:27 +0000 (12:51 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 25 Aug 2010 12:51:27 +0000 (12:51 +0000)
Then patching the return sequence for debugger break at return a call is placed at the very end of the instruction stream causing the return address to be just after the actual instruction in the code object.
Review URL: http://codereview.chromium.org/3151037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/objects-inl.h
test/cctest/cctest.status
test/cctest/test-debug.cc

index 0ef39fc..005da60 100644 (file)
@@ -2936,7 +2936,7 @@ byte* Code::entry() {
 
 bool Code::contains(byte* pc) {
   return (instruction_start() <= pc) &&
-      (pc < instruction_start() + instruction_size());
+      (pc <= instruction_start() + instruction_size());
 }
 
 
index 895e245..6ce7ef4 100644 (file)
@@ -51,6 +51,10 @@ test-api/OutOfMemoryNested: SKIP
 # BUG(355): Test crashes on ARM.
 test-log/ProfLazyMode: SKIP
 
+# BUG(845)
+test-debug/GCDuringBreakPointProcessing: SKIP
+test-debug/BreakPointICCallWithGC: SKIP
+
 [ $arch == mips ]
 test-accessors: SKIP
 test-alloc: SKIP
index 315d14d..3a1390c 100644 (file)
@@ -870,7 +870,7 @@ static void DebugEventBreakPointCollectGarbage(
       Heap::CollectGarbage(0, v8::internal::NEW_SPACE);
     } else {
       // Mark sweep (and perhaps compact).
-      Heap::CollectAllGarbage(false);
+      Heap::CollectAllGarbage(true);
     }
   }
 }