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

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

Issue 23533015: Debug: parameterize 'step over' action with a frame where the step must be performed (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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 19 matching lines...) Expand all
30 #include <stdlib.h> 30 #include <stdlib.h>
31 31
32 #define V8_DISABLE_DEPRECATIONS 1 32 #define V8_DISABLE_DEPRECATIONS 1
33 #include "v8.h" 33 #include "v8.h"
34 34
35 #include "api.h" 35 #include "api.h"
36 #include "cctest.h" 36 #include "cctest.h"
37 #include "compilation-cache.h" 37 #include "compilation-cache.h"
38 #include "debug.h" 38 #include "debug.h"
39 #include "deoptimizer.h" 39 #include "deoptimizer.h"
40 #include "frames.h"
40 #include "platform.h" 41 #include "platform.h"
41 #include "stub-cache.h" 42 #include "stub-cache.h"
42 #include "utils.h" 43 #include "utils.h"
43 #undef V8_DISABLE_DEPRECATIONS 44 #undef V8_DISABLE_DEPRECATIONS
44 45
45 46
46 using ::v8::internal::EmbeddedVector; 47 using ::v8::internal::EmbeddedVector;
47 using ::v8::internal::Object; 48 using ::v8::internal::Object;
48 using ::v8::internal::OS; 49 using ::v8::internal::OS;
49 using ::v8::internal::Handle; 50 using ::v8::internal::Handle;
50 using ::v8::internal::Heap; 51 using ::v8::internal::Heap;
51 using ::v8::internal::JSGlobalProxy; 52 using ::v8::internal::JSGlobalProxy;
52 using ::v8::internal::Code; 53 using ::v8::internal::Code;
53 using ::v8::internal::Debug; 54 using ::v8::internal::Debug;
54 using ::v8::internal::Debugger; 55 using ::v8::internal::Debugger;
55 using ::v8::internal::CommandMessage; 56 using ::v8::internal::CommandMessage;
56 using ::v8::internal::CommandMessageQueue; 57 using ::v8::internal::CommandMessageQueue;
58 using ::v8::internal::StackFrame;
57 using ::v8::internal::StepAction; 59 using ::v8::internal::StepAction;
58 using ::v8::internal::StepIn; // From StepAction enum 60 using ::v8::internal::StepIn; // From StepAction enum
59 using ::v8::internal::StepNext; // From StepAction enum 61 using ::v8::internal::StepNext; // From StepAction enum
60 using ::v8::internal::StepOut; // From StepAction enum 62 using ::v8::internal::StepOut; // From StepAction enum
61 using ::v8::internal::Vector; 63 using ::v8::internal::Vector;
62 using ::v8::internal::StrLength; 64 using ::v8::internal::StrLength;
63 65
64 // Size of temp buffer for formatting small strings. 66 // Size of temp buffer for formatting small strings.
65 #define SMALL_STRING_BUFFER_SIZE 80 67 #define SMALL_STRING_BUFFER_SIZE 80
66 68
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } else { 379 } else {
378 v8::Script::Compile( 380 v8::Script::Compile(
379 v8::String::New("debug.Debug.clearBreakOnUncaughtException()"))->Run(); 381 v8::String::New("debug.Debug.clearBreakOnUncaughtException()"))->Run();
380 } 382 }
381 } 383 }
382 384
383 385
384 // Prepare to step to next break location. 386 // Prepare to step to next break location.
385 static void PrepareStep(StepAction step_action) { 387 static void PrepareStep(StepAction step_action) {
386 v8::internal::Debug* debug = v8::internal::Isolate::Current()->debug(); 388 v8::internal::Debug* debug = v8::internal::Isolate::Current()->debug();
387 debug->PrepareStep(step_action, 1); 389 debug->PrepareStep(step_action, 1, StackFrame::NO_ID);
388 } 390 }
389 391
390 392
391 // This function is in namespace v8::internal to be friend with class 393 // This function is in namespace v8::internal to be friend with class
392 // v8::internal::Debug. 394 // v8::internal::Debug.
393 namespace v8 { 395 namespace v8 {
394 namespace internal { 396 namespace internal {
395 397
396 // Collect the currently debugged functions. 398 // Collect the currently debugged functions.
397 Handle<FixedArray> GetDebuggedFunctions() { 399 Handle<FixedArray> GetDebuggedFunctions() {
(...skipping 7149 matching lines...) Expand 10 before | Expand all | Expand 10 after
7547 TEST(LiveEditDisabled) { 7549 TEST(LiveEditDisabled) {
7548 v8::internal::FLAG_allow_natives_syntax = true; 7550 v8::internal::FLAG_allow_natives_syntax = true;
7549 LocalContext env; 7551 LocalContext env;
7550 v8::HandleScope scope(env->GetIsolate()); 7552 v8::HandleScope scope(env->GetIsolate());
7551 v8::Debug::SetLiveEditEnabled(false); 7553 v8::Debug::SetLiveEditEnabled(false);
7552 CompileRun("%LiveEditCompareStrings('', '')"); 7554 CompileRun("%LiveEditCompareStrings('', '')");
7553 } 7555 }
7554 7556
7555 7557
7556 #endif // ENABLE_DEBUGGER_SUPPORT 7558 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« src/runtime.cc ('K') | « src/runtime.cc ('k') | test/mjsunit/debug-step-4-in-frame.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698