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

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: follow code review 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
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/debug-step-4-in-frame.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 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 "platform/condition-variable.h" 42 #include "platform/condition-variable.h"
42 #include "platform/socket.h" 43 #include "platform/socket.h"
43 #include "stub-cache.h" 44 #include "stub-cache.h"
44 #include "utils.h" 45 #include "utils.h"
45 #undef V8_DISABLE_DEPRECATIONS 46 #undef V8_DISABLE_DEPRECATIONS
46 47
47 48
48 using ::v8::internal::Mutex; 49 using ::v8::internal::Mutex;
49 using ::v8::internal::LockGuard; 50 using ::v8::internal::LockGuard;
50 using ::v8::internal::ConditionVariable; 51 using ::v8::internal::ConditionVariable;
51 using ::v8::internal::Semaphore; 52 using ::v8::internal::Semaphore;
52 using ::v8::internal::EmbeddedVector; 53 using ::v8::internal::EmbeddedVector;
53 using ::v8::internal::Object; 54 using ::v8::internal::Object;
54 using ::v8::internal::OS; 55 using ::v8::internal::OS;
55 using ::v8::internal::Handle; 56 using ::v8::internal::Handle;
56 using ::v8::internal::Heap; 57 using ::v8::internal::Heap;
57 using ::v8::internal::JSGlobalProxy; 58 using ::v8::internal::JSGlobalProxy;
58 using ::v8::internal::Code; 59 using ::v8::internal::Code;
59 using ::v8::internal::Debug; 60 using ::v8::internal::Debug;
60 using ::v8::internal::Debugger; 61 using ::v8::internal::Debugger;
61 using ::v8::internal::CommandMessage; 62 using ::v8::internal::CommandMessage;
62 using ::v8::internal::CommandMessageQueue; 63 using ::v8::internal::CommandMessageQueue;
64 using ::v8::internal::StackFrame;
63 using ::v8::internal::StepAction; 65 using ::v8::internal::StepAction;
64 using ::v8::internal::StepIn; // From StepAction enum 66 using ::v8::internal::StepIn; // From StepAction enum
65 using ::v8::internal::StepNext; // From StepAction enum 67 using ::v8::internal::StepNext; // From StepAction enum
66 using ::v8::internal::StepOut; // From StepAction enum 68 using ::v8::internal::StepOut; // From StepAction enum
67 using ::v8::internal::Vector; 69 using ::v8::internal::Vector;
68 using ::v8::internal::StrLength; 70 using ::v8::internal::StrLength;
69 71
70 // Size of temp buffer for formatting small strings. 72 // Size of temp buffer for formatting small strings.
71 #define SMALL_STRING_BUFFER_SIZE 80 73 #define SMALL_STRING_BUFFER_SIZE 80
72 74
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } else { 385 } else {
384 v8::Script::Compile( 386 v8::Script::Compile(
385 v8::String::New("debug.Debug.clearBreakOnUncaughtException()"))->Run(); 387 v8::String::New("debug.Debug.clearBreakOnUncaughtException()"))->Run();
386 } 388 }
387 } 389 }
388 390
389 391
390 // Prepare to step to next break location. 392 // Prepare to step to next break location.
391 static void PrepareStep(StepAction step_action) { 393 static void PrepareStep(StepAction step_action) {
392 v8::internal::Debug* debug = v8::internal::Isolate::Current()->debug(); 394 v8::internal::Debug* debug = v8::internal::Isolate::Current()->debug();
393 debug->PrepareStep(step_action, 1); 395 debug->PrepareStep(step_action, 1, StackFrame::NO_ID);
394 } 396 }
395 397
396 398
397 // This function is in namespace v8::internal to be friend with class 399 // This function is in namespace v8::internal to be friend with class
398 // v8::internal::Debug. 400 // v8::internal::Debug.
399 namespace v8 { 401 namespace v8 {
400 namespace internal { 402 namespace internal {
401 403
402 // Collect the currently debugged functions. 404 // Collect the currently debugged functions.
403 Handle<FixedArray> GetDebuggedFunctions() { 405 Handle<FixedArray> GetDebuggedFunctions() {
(...skipping 7128 matching lines...) Expand 10 before | Expand all | Expand 10 after
7532 TEST(LiveEditDisabled) { 7534 TEST(LiveEditDisabled) {
7533 v8::internal::FLAG_allow_natives_syntax = true; 7535 v8::internal::FLAG_allow_natives_syntax = true;
7534 LocalContext env; 7536 LocalContext env;
7535 v8::HandleScope scope(env->GetIsolate()); 7537 v8::HandleScope scope(env->GetIsolate());
7536 v8::Debug::SetLiveEditEnabled(false); 7538 v8::Debug::SetLiveEditEnabled(false);
7537 CompileRun("%LiveEditCompareStrings('', '')"); 7539 CompileRun("%LiveEditCompareStrings('', '')");
7538 } 7540 }
7539 7541
7540 7542
7541 #endif // ENABLE_DEBUGGER_SUPPORT 7543 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« no previous file with comments | « 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