Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: test/cctest/test-debug.cc

Issue 1234833003: Debugger: use debug break slots to break at function exit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix for arm Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/mjsunit/debug-return-value.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 HeapIterator iterator(CcTest::heap()); 405 HeapIterator iterator(CcTest::heap());
406 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { 406 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
407 CHECK(!obj->IsDebugInfo()); 407 CHECK(!obj->IsDebugInfo());
408 CHECK(!obj->IsBreakPointInfo()); 408 CHECK(!obj->IsBreakPointInfo());
409 409
410 // If deep check of functions is requested check that no debug break code 410 // If deep check of functions is requested check that no debug break code
411 // is left in all functions. 411 // is left in all functions.
412 if (check_functions) { 412 if (check_functions) {
413 if (obj->IsJSFunction()) { 413 if (obj->IsJSFunction()) {
414 JSFunction* fun = JSFunction::cast(obj); 414 JSFunction* fun = JSFunction::cast(obj);
415 for (RelocIterator it(fun->shared()->code()); !it.done(); it.next()) { 415 for (RelocIterator it(fun->shared()->code(),
416 RelocInfo::Mode rmode = it.rinfo()->rmode(); 416 RelocInfo::kDebugBreakSlotMask);
417 if (RelocInfo::IsCodeTarget(rmode)) { 417 !it.done(); it.next()) {
418 CHECK(!Debug::IsDebugBreak(it.rinfo()->target_address())); 418 CHECK(!it.rinfo()->IsPatchedDebugBreakSlotSequence());
419 } else if (RelocInfo::IsJSReturn(rmode)) {
420 CHECK(!it.rinfo()->IsPatchedReturnSequence());
421 }
422 } 419 }
423 } 420 }
424 } 421 }
425 } 422 }
426 } 423 }
427 424
428 425
429 } // namespace internal 426 } // namespace internal
430 } // namespace v8 427 } // namespace v8
431 428
(...skipping 7143 matching lines...) Expand 10 before | Expand all | Expand 10 after
7575 "let y = 2; \n" 7572 "let y = 2; \n"
7576 "debugger; \n" 7573 "debugger; \n"
7577 "x * y", 7574 "x * y",
7578 30); 7575 30);
7579 ExpectInt32( 7576 ExpectInt32(
7580 "x = 1; y = 2; \n" 7577 "x = 1; y = 2; \n"
7581 "debugger;" 7578 "debugger;"
7582 "x * y", 7579 "x * y",
7583 30); 7580 30);
7584 } 7581 }
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/mjsunit/debug-return-value.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698