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

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

Issue 13285: Refactor the convertion of a target address into a code object from the debug... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years 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 | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 int bp = SetBreakPoint(fun, position); 390 int bp = SetBreakPoint(fun, position);
391 391
392 // Check that the debug break function is as expected. 392 // Check that the debug break function is as expected.
393 Handle<v8::internal::SharedFunctionInfo> shared(fun->shared()); 393 Handle<v8::internal::SharedFunctionInfo> shared(fun->shared());
394 CHECK(Debug::HasDebugInfo(shared)); 394 CHECK(Debug::HasDebugInfo(shared));
395 TestBreakLocationIterator it1(Debug::GetDebugInfo(shared)); 395 TestBreakLocationIterator it1(Debug::GetDebugInfo(shared));
396 it1.FindBreakLocationFromPosition(position); 396 it1.FindBreakLocationFromPosition(position);
397 CHECK_EQ(mode, it1.it()->rinfo()->rmode()); 397 CHECK_EQ(mode, it1.it()->rinfo()->rmode());
398 if (mode != v8::internal::RelocInfo::JS_RETURN) { 398 if (mode != v8::internal::RelocInfo::JS_RETURN) {
399 CHECK_EQ(debug_break, 399 CHECK_EQ(debug_break,
400 Debug::GetCodeTarget(it1.it()->rinfo()->target_address())); 400 Code::GetCodeFromTargetAddress(it1.it()->rinfo()->target_address()));
401 } else { 401 } else {
402 // TODO(1240753): Make the test architecture independent or split 402 // TODO(1240753): Make the test architecture independent or split
403 // parts of the debugger into architecture dependent files. 403 // parts of the debugger into architecture dependent files.
404 CHECK_EQ(0xE8, *(it1.rinfo()->pc())); 404 CHECK_EQ(0xE8, *(it1.rinfo()->pc()));
405 } 405 }
406 406
407 // Clear the break point and check that the debug break function is no longer 407 // Clear the break point and check that the debug break function is no longer
408 // there 408 // there
409 ClearBreakPoint(bp); 409 ClearBreakPoint(bp);
410 CHECK(!Debug::HasDebugInfo(shared)); 410 CHECK(!Debug::HasDebugInfo(shared));
(...skipping 2900 matching lines...) Expand 10 before | Expand all | Expand 10 after
3311 " CheckSourceLine(2)\n" 3311 " CheckSourceLine(2)\n"
3312 " CheckSourceLine(3)\n" 3312 " CheckSourceLine(3)\n"
3313 "}; f()"))->Run(); 3313 "}; f()"))->Run();
3314 3314
3315 // Test that a parameter can be passed to a function called in the debugger. 3315 // Test that a parameter can be passed to a function called in the debugger.
3316 v8::Script::Compile(v8::String::New("CheckDataParameter()"))->Run(); 3316 v8::Script::Compile(v8::String::New("CheckDataParameter()"))->Run();
3317 3317
3318 // Test that a function with closure can be run in the debugger. 3318 // Test that a function with closure can be run in the debugger.
3319 v8::Script::Compile(v8::String::New("CheckClosure()"))->Run(); 3319 v8::Script::Compile(v8::String::New("CheckClosure()"))->Run();
3320 } 3320 }
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698