34 message_handler_(
NULL),
36 command_queue_(isolate->logger(), kQueueInitialSize),
37 event_command_queue_(isolate->logger(), kQueueInitialSize),
39 is_suppressed_(
false),
40 live_edit_enabled_(
true),
41 has_break_points_(
false),
42 break_disabled_(
false),
43 break_on_exception_(
false),
44 break_on_uncaught_exception_(
false),
46 debug_info_list_(
NULL),
83 CodeStub::Major major_key = CodeStub::GetMajorKey(code);
84 return major_key == CodeStub::CallFunction;
91 CodeStub::Major major_key = CodeStub::GetMajorKey(code);
92 return major_key == CodeStub::CallFunction;
189 int closest_break_point = 0;
193 if (this->
pc() <= pc &&
pc - this->
pc() < distance) {
195 distance =
static_cast<int>(
pc - this->
pc());
197 if (distance == 0)
break;
204 Next(closest_break_point);
213 int closest_break_point = 0;
230 if (position <= next_position && next_position -
position < distance) {
232 distance = next_position -
position;
234 if (distance == 0)
break;
241 Next(closest_break_point);
373 return CodeStub::GetMajorKey(*target_code) == CodeStub::CallFunction;
375 return target_code->is_call_stub();
393 maybe_call_function_stub =
396 bool is_call_function_stub =
397 (maybe_call_function_stub->kind() ==
Code::STUB &&
398 CodeStub::GetMajorKey(*maybe_call_function_stub) ==
399 CodeStub::CallFunction);
409 target_code->is_inline_cache_stub() ||
410 is_call_function_stub);
440 Isolate* isolate = code->GetIsolate();
444 if (code->is_inline_cache_stub()) {
445 switch (code->kind()) {
447 return isolate->
builtins()->CallICStub_DebugBreak();
450 return isolate->
builtins()->LoadIC_DebugBreak();
453 return isolate->
builtins()->StoreIC_DebugBreak();
455 case Code::KEYED_LOAD_IC:
456 return isolate->
builtins()->KeyedLoadIC_DebugBreak();
458 case Code::KEYED_STORE_IC:
459 return isolate->
builtins()->KeyedStoreIC_DebugBreak();
461 case Code::COMPARE_NIL_IC:
462 return isolate->
builtins()->CompareNilIC_DebugBreak();
469 if (code->has_function_cache()) {
470 return isolate->
builtins()->CallConstructStub_Recording_DebugBreak();
472 return isolate->
builtins()->CallConstructStub_DebugBreak();
476 DCHECK(CodeStub::GetMajorKey(*code) == CodeStub::CallFunction);
477 return isolate->
builtins()->CallFunctionStub_DebugBreak();
498 rinfo()->set_target_address(dbgbrk_code->entry());
580 char* from = storage;
603 HeapIterator iterator(heap);
606 for (
HeapObject* obj = iterator.next(); obj !=
NULL; obj = iterator.next()) {
607 if (obj->IsScript() && Script::cast(obj)->HasValidSource()) {
617 int id = script->id()->value();
618 HashMap::Entry* entry =
620 if (entry->value !=
NULL) {
625 DCHECK(script->id() == found->id());
626 DCHECK(!script->name()->IsString() ||
627 String::cast(script->name())->Equals(String::cast(found->name())));
638 entry->value = script_.location();
646 for (HashMap::Entry* entry =
Start(); entry !=
NULL; entry =
Next(entry)) {
648 if (entry->value !=
NULL) {
649 instances->set(count, *
reinterpret_cast<Script**
>(entry->value));
659 for (HashMap::Entry* entry =
Start(); entry !=
NULL; entry =
Next(entry)) {
661 Object** location =
reinterpret_cast<Object**
>(entry->value);
662 DCHECK((*location)->IsScript());
676 void* key =
reinterpret_cast<void*
>(id);
682 HashMap::Entry* entry = script_cache->
Lookup(key, hash,
false);
683 Object** location =
reinterpret_cast<Object**
>(entry->value);
684 script_cache->
Remove(key, hash);
729 Factory* factory = isolate->
factory();
733 if (index == -1)
return false;
740 factory->NewStringFromAscii(
name).ToHandleChecked();
746 source_code, script_name, 0, 0,
false, context,
NULL,
NULL,
758 factory->NewFunctionFromSharedFunctionInfo(function_info, context);
762 function,
handle(context->global_proxy()), 0,
NULL, &maybe_exception);
770 isolate,
"error_loading_debugger", &computed_location,
774 if (maybe_exception.ToHandle(&exception)) {
783 Handle<Script> script(Script::cast(function->shared()->script()));
801 PostponeInterruptsScope postpone(
isolate_);
813 if (context.
is_null())
return false;
830 bool caught_exception =
834 if (FLAG_enable_liveedit) {
835 caught_exception = caught_exception ||
839 if (caught_exception)
return false;
869 DCHECK(args.length() == 0);
879 if (debug_scope.failed())
return;
882 PostponeInterruptsScope postpone(
isolate_);
917 break_points_hit->IsUndefined() ) {
920 }
else if (!break_points_hit->IsUndefined() ||
952 JavaScriptFrameIterator it(
isolate_);
960 if (step_count > 1) {
974 PrepareStep(step_action, step_count, StackFrame::NO_ID);
981 JavaScriptFrameIterator it(isolate);
982 isolate->debug()->Break(args, it.frame());
983 isolate->debug()->SetAfterBreakTarget(it.frame());
984 return isolate->heap()->undefined_value();
997 int break_points_hit_count = 0;
998 DCHECK(!break_point_objects->IsUndefined());
999 if (break_point_objects->IsFixedArray()) {
1001 break_points_hit = factory->NewFixedArray(array->length());
1002 for (
int i = 0;
i < array->length();
i++) {
1005 break_points_hit->set(break_points_hit_count++, *o);
1009 break_points_hit = factory->NewFixedArray(1);
1011 break_points_hit->set(break_points_hit_count++, *break_point_objects);
1016 if (break_points_hit_count == 0) {
1017 return factory->undefined_value();
1020 Handle<JSArray> result = factory->NewJSArrayWithElements(break_points_hit);
1021 result->set_length(
Smi::FromInt(break_points_hit_count));
1032 if (!break_point_object->IsJSObject())
return true;
1036 factory->InternalizeOneByteString(
1041 debug_global, is_break_point_triggered_string).ToHandleChecked());
1049 if (!Execution::TryCall(check_break_point,
1052 argv).ToHandle(&result)) {
1057 return result->IsTrue();
1063 return !shared->debug_info()->IsUndefined();
1077 int* source_position) {
1091 DCHECK(*source_position >= 0);
1101 return debug_info->GetBreakPointCount() > 0;
1107 int* source_position,
1115 if (result->IsUndefined())
return false;
1127 if (shared->start_position() > *source_position) {
1130 position = *source_position - shared->start_position();
1142 *source_position = it.
position() + shared->start_position();
1145 DCHECK(debug_info->GetBreakPointCount() > 0);
1154 while (node !=
NULL) {
1156 break_point_object);
1157 if (!result->IsUndefined()) {
1165 break_point_info->code_position()->value());
1170 if (debug_info->GetBreakPointCount() == 0) {
1176 node = node->
next();
1183 while (node !=
NULL) {
1187 node = node->
next();
1209 while (!it.
Done()) {
1221 if (!bindee.
is_null() && bindee->IsJSFunction() &&
1222 !JSFunction::cast(*bindee)->IsFromNativeScript()) {
1232 if (
id == StackFrame::NO_ID) {
1236 for (JavaScriptFrameIterator it(
isolate_,
id); !it.done(); it.Advance()) {
1238 if (frame->HasHandler()) {
1269 "PromiseHasRejectHandler")));
1271 Execution::Call(
isolate_, fun, promise, 0,
NULL).ToHandleChecked();
1272 return result->IsTrue();
1278 StackFrame::Id frame_id) {
1300 if (
id == StackFrame::NO_ID) {
1304 if (frame_id != StackFrame::NO_ID) {
1307 JavaScriptFrameIterator frames_it(
isolate_,
id);
1317 if (!frame->
function()->IsJSFunction()) {
1320 frames_it.Advance();
1322 JSFunction*
function = frames_it.frame()->function();
1343 bool is_load_or_store =
false;
1344 bool is_inline_cache_stub =
false;
1345 bool is_at_restarted_function =
false;
1350 bool is_call_target =
false;
1354 is_call_target =
true;
1357 is_inline_cache_stub =
true;
1358 is_load_or_store = !is_call_target;
1362 Code* maybe_call_function_stub = code;
1367 maybe_call_function_stub =
1371 CodeStub::GetMajorKey(maybe_call_function_stub) ==
1372 CodeStub::CallFunction) ||
1373 maybe_call_function_stub->
kind() == Code::CALL_IC) {
1376 call_function_stub =
Handle<Code>(maybe_call_function_stub);
1380 is_at_restarted_function =
true;
1387 while (step_count-- > 0 && !frames_it.done()) {
1388 frames_it.Advance();
1392 frames_it.Advance();
1395 while (!frames_it.done() &&
1396 frames_it.frame()->function()->IsFromNativeScript()) {
1397 frames_it.Advance();
1401 if (!frames_it.done()) {
1403 JSFunction*
function = frames_it.frame()->function();
1409 !call_function_stub.
is_null() || is_at_restarted_function)
1418 debug_info->code()->SourceStatementPosition(frame->pc());
1423 if (is_at_restarted_function) {
1427 }
else if (!call_function_stub.
is_null()) {
1430 bool is_call_ic = call_function_stub->kind() == Code::CALL_IC;
1433 uint32_t key = call_function_stub->stub_key();
1436 int call_function_arg_count = is_call_ic
1439 CodeStub::MinorKeyFromKey(key));
1442 CodeStub::GetMajorKey(*call_function_stub) ==
1443 CodeStub::MajorKeyFromKey(key));
1453 DCHECK(expressions_count - 2 - call_function_arg_count >= 0);
1455 expressions_count - 2 - call_function_arg_count);
1458 if (fun->IsJSFunction()) {
1459 Isolate* isolate = JSFunction::cast(fun)->GetIsolate();
1462 while (fun->IsJSFunction()) {
1463 Code* code = JSFunction::cast(fun)->shared()->code();
1464 if (code != apply && code != call)
break;
1466 expressions_count - 1 - call_function_arg_count);
1470 if (fun->IsJSFunction()) {
1472 if (js_function->shared()->bound()) {
1474 }
else if (!js_function->IsFromNativeScript()) {
1488 if (is_load_or_store) {
1494 debug_info->code()->SourceStatementPosition(frame->pc());
1525 if (break_location_iterator->
IsExit())
return false;
1528 int current_statement_position =
1554 Isolate* isolate = shared->GetIsolate();
1560 if (debug_info->GetBreakPointCount() == 0) {
1564 isolate->
factory()->NewFixedArray(debug_info->GetBreakPointCount());
1566 for (
int i = 0;
i < debug_info->break_points()->length();
i++) {
1567 if (!debug_info->break_points()->get(
i)->IsUndefined()) {
1569 BreakPointInfo::cast(debug_info->break_points()->get(
i));
1572 switch (position_alignment) {
1574 position = break_point_info->statement_position();
1577 position = break_point_info->source_position();
1581 position = break_point_info->statement_position();
1584 locations->set(count++, position);
1596 bool is_constructor) {
1597 Isolate* isolate =
function->GetIsolate();
1603 if (is_constructor) {
1613 if (function->shared()->bound()) {
1616 }
else if (!function->IsFromNativeScript()) {
1618 if (function->shared()->code() ==
1620 function->shared()->code() ==
1626 if (!holder.
is_null() && holder->IsJSFunction()) {
1628 if (!js_function->IsFromNativeScript()) {
1630 }
else if (js_function->shared()->bound()) {
1664 while (node !=
NULL) {
1666 while (!it.
Done()) {
1670 node = node->
next();
1706 ThreadLocalTop* top,
1708 Object* active_code_marker) {
1713 for (JavaScriptFrameIterator it(isolate, top); !it.done(); it.Advance()) {
1715 if (frame->is_optimized()) {
1718 for (
int i = 0;
i < functions.length();
i++) {
1721 function->shared()->code()->set_gc_metadata(active_code_marker);
1723 }
else if (frame->
function()->IsJSFunction()) {
1725 DCHECK(frame->LookupCode()->kind() == Code::FUNCTION);
1727 function->shared()->code()->set_gc_metadata(active_code_marker);
1746 int code_offset = pc_offset;
1749 if (info->
pc() >=
pc)
break;
1751 code_offset -=
static_cast<int>(info->
data());
1774 reloc +=
static_cast<int>(info->
data());
1778 int pc_offset = code_offset + reloc;
1788 ThreadLocalTop* top) {
1789 for (JavaScriptFrameIterator it(isolate, top); !it.done(); it.Advance()) {
1792 if (frame->is_optimized() || !frame->
function()->IsJSFunction())
continue;
1796 DCHECK(frame->LookupCode()->kind() == Code::FUNCTION);
1799 if (frame_code->has_debug_break_slots())
continue;
1802 if (new_code->kind() != Code::FUNCTION ||
1803 !new_code->has_debug_break_slots()) {
1808 static_cast<int>(frame->pc() - frame_code->instruction_start());
1813 byte* new_pc = new_code->instruction_start() + new_pc_offset;
1815 if (FLAG_trace_deopt) {
1820 reinterpret_cast<intptr_t
>(
1821 frame_code->instruction_start()),
1822 reinterpret_cast<intptr_t
>(
1823 frame_code->instruction_start()) +
1824 frame_code->instruction_size(),
1825 frame_code->instruction_size(),
1826 reinterpret_cast<intptr_t
>(new_code->instruction_start()),
1827 reinterpret_cast<intptr_t
>(new_code->instruction_start()) +
1828 new_code->instruction_size(),
1829 new_code->instruction_size(),
1830 reinterpret_cast<intptr_t
>(frame->pc()),
1831 reinterpret_cast<intptr_t
>(new_pc));
1834 if (FLAG_enable_ool_constant_pool) {
1836 frame->set_constant_pool(new_code->constant_pool());
1841 frame->set_pc(new_pc);
1849 Object* active_code_marker)
1875 if (function->code()->kind() == Code::FUNCTION &&
1876 function->code()->has_debug_break_slots()) {
1882 if (!function->shared()->code()->has_debug_break_slots()) {
1885 if (!code.
is_null())
function->ReplaceCode(*code.ToHandleChecked());
1888 function->ReplaceCode(function->shared()->code());
1895 for (
int i = 0;
i < generators.length();
i++) {
1900 int code_offset = generators[
i]->continuation();
1902 generators[
i]->set_continuation(pc_offset);
1946 "preparing for breakpoints");
1947 HeapIterator iterator(heap);
1953 Object* active_code_marker = heap->the_hole_value();
1958 active_code_marker);
1960 active_code_marker);
1962 &active_functions_collector);
1968 while (((obj = iterator.next()) !=
NULL)) {
1969 if (obj->IsJSFunction()) {
1970 JSFunction*
function = JSFunction::cast(obj);
1973 if (!shared->allows_lazy_compilation())
continue;
1974 if (!shared->script()->IsScript())
continue;
1975 if (function->IsFromNativeScript())
continue;
1976 if (shared->code()->gc_metadata() == active_code_marker)
continue;
1978 if (shared->is_generator()) {
1984 if (kind == Code::FUNCTION &&
1985 !function->code()->has_debug_break_slots()) {
1986 function->ReplaceCode(*lazy_compile);
1987 function->shared()->ReplaceCode(*lazy_compile);
1989 (function->IsInOptimizationQueue() ||
1990 function->IsMarkedForOptimization() ||
1991 function->IsMarkedForConcurrentOptimization())) {
1993 Code* shared_code =
function->shared()->code();
1994 if (shared_code->
kind() == Code::FUNCTION &&
1996 function->ReplaceCode(shared_code);
1998 function->ReplaceCode(*lazy_compile);
1999 function->shared()->ReplaceCode(*lazy_compile);
2002 }
else if (obj->IsJSGeneratorObject()) {
2024 for (
int i = 0;
i < active_functions.length();
i++) {
2026 function->shared()->code()->set_gc_metadata(
Smi::FromInt(0));
2036 for (
int i = 0;
i < generator_functions.length();
i++) {
2038 if (function->code()->kind() != Code::FUNCTION)
continue;
2039 if (function->code()->has_debug_break_slots())
continue;
2040 function->ReplaceCode(*lazy_compile);
2041 function->shared()->ReplaceCode(*lazy_compile);
2049 for (
int i = 0;
i < active_functions.length();
i++) {
2054 if (shared->is_toplevel())
continue;
2055 if (!shared->allows_lazy_compilation())
continue;
2066 &active_functions_redirector);
2092 HeapIterator iterator(heap);
2094 obj !=
NULL; obj = iterator.next()) {
2095 bool found_next_candidate =
false;
2098 if (obj->IsJSFunction()) {
2101 DCHECK(shared->allows_lazy_compilation() || shared->is_compiled());
2102 found_next_candidate =
true;
2103 }
else if (obj->IsSharedFunctionInfo()) {
2107 found_next_candidate = shared->is_compiled() ||
2108 shared->allows_lazy_compilation_without_context();
2110 if (!found_next_candidate)
continue;
2111 if (shared->script() == *script) {
2114 int start_position = shared->function_token_position();
2116 start_position = shared->start_position();
2118 if (start_position <= position &&
2119 position <= shared->end_position()) {
2123 target_start_position = start_position;
2124 target_function =
function;
2127 if (target_start_position == start_position &&
2128 shared->end_position() == target->end_position()) {
2132 if (!shared->is_toplevel()) {
2133 target_start_position = start_position;
2134 target_function =
function;
2137 }
else if (target_start_position <= start_position &&
2138 shared->end_position() <= target->end_position()) {
2142 target_start_position = start_position;
2143 target_function =
function;
2152 if (target.
is_null())
return heap->undefined_value();
2158 done = target->is_compiled();
2179 Isolate* isolate = shared->GetIsolate();
2183 DCHECK(shared->is_compiled());
2191 if (!
function.is_null() &&
2213 while (current !=
NULL) {
2221 current->
debug_info()->shared()->set_debug_info(
2233 current = current->
next();
2256 Handle<Code> original_code(debug_info->original_code());
2260 DCHECK(frame_code.is_identical_to(code));
2269 bool at_js_return =
false;
2270 bool break_at_js_return_active =
false;
2271 bool at_debug_break_slot =
false;
2273 while (!it.
done() && !at_js_return && !at_debug_break_slot) {
2275 at_js_return = (it.
rinfo()->
pc() ==
2277 break_at_js_return_active = it.
rinfo()->IsPatchedReturnSequence();
2280 at_debug_break_slot = (it.
rinfo()->
pc() ==
2292 if (break_at_js_return_active) {
2293 addr += original_code->instruction_start() - code->instruction_start();
2298 }
else if (at_debug_break_slot) {
2313 addr += original_code->instruction_start() - code->instruction_start();
2353 DCHECK(frame_code.is_identical_to(code));
2361 while (!it.
done()) {
2374 Object** restarter_frame_function_pointer) {
2380 restarter_frame_function_pointer;
2390 PostponeInterruptsScope postpone(
isolate_);
2396 factory->NewStringFromAsciiChecked(
"next_handle_"),
2399 factory->NewStringFromAsciiChecked(
"mirror_cache_"),
2412 "Debug::GetLoadedScripts");
2425 script->set_eval_from_shared(it.frame()->function()->shared());
2426 Code* code = it.frame()->LookupCode();
2427 int offset =
static_cast<int>(
2429 script->set_eval_from_instructions_offset(
Smi::FromInt(offset));
2441 isolate_, global, constructor_name).ToHandleChecked();
2442 DCHECK(constructor->IsJSFunction());
2445 PostponeInterruptsScope no_interrupts(
isolate_);
2515 if (!scheduled_exception.
is_null()) {
2530 if (promise->IsJSObject()) {
2543 if (debug_scope.failed())
return;
2552 exception, uncaught, promise).ToHandle(&event_data)) {
2568 if (debug_scope.failed())
return;
2581 bool auto_continue) {
2591 if (!
MakeBreakEvent(break_points_hit).ToHandle(&event_data))
return;
2605 if (debug_scope.failed())
return;
2630 if (debug_scope.failed())
return;
2642 debug_global, update_script_break_points_string).ToHandleChecked();
2643 if (!update_script_break_points->IsJSFunction()) {
2646 DCHECK(update_script_break_points->IsJSFunction());
2676 if (debug_scope.failed())
return;
2695 if (debug_scope.failed())
return;
2711 bool auto_continue) {
2755 FUNCTION_CAST<v8::Debug::EventCallback>(
2762 callback(event_details);
2788 bool auto_continue) {
2791 PostponeInterruptsScope no_interrupts(
isolate_);
2795 bool sendEventMessage =
false;
2799 sendEventMessage = !auto_continue;
2802 sendEventMessage =
true;
2807 sendEventMessage =
true;
2823 if (sendEventMessage) {
2839 bool running = auto_continue;
2842 isolate_, exec_state,
"debugCommandProcessor").ToHandleChecked();
2845 isolate_, cmd_processor_ctor, exec_state, 1, ctor_args).ToHandleChecked();
2848 isolate_, cmd_processor,
"processDebugRequest").ToHandleChecked());
2850 isolate_, cmd_processor,
"isRunning").ToHandleChecked();
2860 "Got request from command queue, in interactive loop.");
2871 command_text).ToHandleChecked();
2877 Execution::TryCall(process_debug_request, cmd_processor, 1,
2878 request_args, &maybe_exception);
2880 if (maybe_result.ToHandle(&answer_value)) {
2881 if (answer_value->IsUndefined()) {
2888 if (FLAG_trace_debug_json) {
2889 PrintF(
"%s\n", request_text->ToCString().get());
2890 PrintF(
"%s\n", answer->ToCString().get());
2894 maybe_result = Execution::Call(
2895 isolate_, is_running, cmd_processor, 1, is_running_args);
2897 if (!maybe_result.ToHandle(&result))
break;
2898 running = result->IsTrue();
2901 if (!maybe_exception.ToHandle(&exception))
break;
2903 if (!Execution::ToString(
isolate_, exception).ToHandle(&result))
break;
2909 event, running, exec_state, event_data, answer, command.
client_data());
2932 if (!callback->IsUndefined() && !callback->IsNull()) {
3006 if (debug_scope.failed())
return isolate_->
factory()->undefined_value();
3015 return Execution::Call(
3033 if (check.HasOverflowed())
return;
3035 { JavaScriptFrameIterator it(
isolate_);
3037 Object* fun = it.frame()->function();
3038 if (fun && fun->IsJSFunction()) {
3040 if (JSFunction::cast(fun)->IsBuiltin())
return;
3041 GlobalObject* global = JSFunction::cast(fun)->context()->global_object();
3061 if (check.HasOverflowed())
return;
3065 if (debug_scope.failed())
return;
3073 DebugScope::DebugScope(
Debug* debug)
3075 prev_(debug->debugger_entry()),
3076 save_(debug_->isolate_),
3077 no_termination_exceptons_(debug_->isolate_,
3078 StackGuard::TERMINATE_EXECUTION) {
3080 debug_->thread_local_.current_debug_scope_ =
this;
3083 break_id_ = debug_->break_id();
3084 break_frame_id_ = debug_->break_frame_id();
3088 JavaScriptFrameIterator it(isolate());
3089 bool has_js_frames = !it.done();
3090 debug_->thread_local_.break_frame_id_ = has_js_frames ? it.frame()->id()
3091 : StackFrame::NO_ID;
3092 debug_->SetNextBreakId();
3094 debug_->UpdateState();
3097 failed_ = !debug_->is_loaded();
3098 if (!failed_) isolate()->set_context(*debug->
debug_context());
3103 DebugScope::~DebugScope() {
3104 if (!failed_ && prev_ ==
NULL) {
3109 if (!isolate()->has_pending_exception()) debug_->ClearMirrorCache();
3113 if (debug_->has_commands()) isolate()->stack_guard()->RequestDebugCommand();
3117 debug_->thread_local_.current_debug_scope_ = prev_;
3120 debug_->thread_local_.break_frame_id_ = break_frame_id_;
3121 debug_->thread_local_.break_id_ = break_id_;
3123 debug_->UpdateState();
3144 exec_state, event_data, response_json, client_data);
3156 : is_event_(is_event),
3159 exec_state_(exec_state),
3160 event_data_(event_data),
3161 response_json_(response_json),
3162 client_data_(client_data) {}
3207 isolate,
event_data_,
"toJSONProtocol").ToHandleChecked();
3208 if (!fun->IsJSFunction()) {
3215 if (!maybe_json.ToHandle(&json) || !json->IsString()) {
3245 exec_state_(exec_state),
3246 event_data_(event_data),
3247 callback_data_(callback_data),
3248 client_data_(client_data) {}
3282 client_data_(
NULL) {
3289 client_data_(data) {
3306 CommandMessageQueue::CommandMessageQueue(
int size) : start_(0), end_(0),
3308 messages_ = NewArray<CommandMessage>(
size);
3312 CommandMessageQueue::~CommandMessageQueue() {
3313 while (!IsEmpty()) Get().Dispose();
3318 CommandMessage CommandMessageQueue::Get() {
3320 int result = start_;
3321 start_ = (start_ + 1) % size_;
3322 return messages_[result];
3326 void CommandMessageQueue::Put(
const CommandMessage& message) {
3327 if ((end_ + 1) % size_ == start_) {
3330 messages_[end_] = message;
3331 end_ = (end_ + 1) % size_;
3335 void CommandMessageQueue::Expand() {
3336 CommandMessageQueue new_queue(size_ * 2);
3337 while (!IsEmpty()) {
3338 new_queue.Put(Get());
3340 CommandMessage* array_to_free = messages_;
3342 new_queue.messages_ = array_to_free;
3344 new_queue.start_ = new_queue.end_;
3349 LockingCommandMessageQueue::LockingCommandMessageQueue(Logger* logger,
int size)
3350 : logger_(logger), queue_(
size) {}
3353 bool LockingCommandMessageQueue::IsEmpty()
const {
3354 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3355 return queue_.IsEmpty();
3359 CommandMessage LockingCommandMessageQueue::Get() {
3360 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3361 CommandMessage result = queue_.Get();
3362 logger_->DebugEvent(
"Get", result.text());
3367 void LockingCommandMessageQueue::Put(
const CommandMessage& message) {
3368 base::LockGuard<base::Mutex> lock_guard(&mutex_);
3369 queue_.Put(message);
3370 logger_->DebugEvent(
"Put", message.text());
3374 void LockingCommandMessageQueue::Clear() {
3375 base::LockGuard<base::Mutex> lock_guard(&mutex_);
A client object passed to the v8 debugger whose ownership will be taken by it.
void(* MessageHandler)(const Message &message)
Debug message callback function.
void(* EventCallback)(const EventDetails &event_details)
Debug event callback function.
A HandleScope which first allocates a handle in the current scope which will be later filled with the...
Local< T > Escape(Local< T > value)
Pushes the value into the previous scope and returns a handle to it.
Create new error objects by calling the corresponding error object constructor with the message.
A container for extension names.
bool IsEmpty() const
Returns true if the handle is empty.
Isolate represents an isolated instance of the V8 engine.
A single JavaScript stack frame.
static Local< Context > ToLocal(v8::internal::Handle< v8::internal::Context > obj)
static v8::internal::Handle< To > OpenHandle(v8::Local< From > handle)
Isolate * GetIsolate() const
Local< T > GetValue() const
ActiveFunctionsCollector(List< Handle< JSFunction > > *active_functions, Object *active_code_marker)
List< Handle< JSFunction > > * active_functions_
void VisitThread(Isolate *isolate, ThreadLocalTop *top)
Object * active_code_marker_
void VisitThread(Isolate *isolate, ThreadLocalTop *top)
static Address target_address_at(Address pc, ConstantPoolArray *constant_pool)
static const int kPatchDebugBreakSlotAddressOffset
static Address break_address_from_return_address(Address pc)
static Address target_address_from_return_address(Address pc)
static const int kDebugBreakSlotLength
static const int kPatchReturnSequenceAddressOffset
Handle< DebugInfo > debug_info_
bool IsDebugBreakAtSlot()
void ClearBreakPoint(Handle< Object > break_point_object)
void FindBreakLocationFromAddress(Address pc)
void SetDebugBreakAtSlot()
BreakLocationIterator(Handle< DebugInfo > debug_info, BreakLocatorType type)
virtual ~BreakLocationIterator()
RelocInfo::Mode rmode() const
void ClearDebugBreakAtIC()
void ClearDebugBreakAtSlot()
bool IsDebugBreakAtReturn()
RelocIterator * reloc_iterator_
void SetBreakPoint(Handle< Object > break_point_object)
RelocIterator * reloc_iterator_original_
bool IsStepInLocation(Isolate *isolate)
void ClearDebugBreakAtReturn()
void PrepareStepIn(Isolate *isolate)
void ClearAllDebugBreak()
RelocInfo * original_rinfo()
Object * BreakPointObjects()
RelocInfo::Mode original_rmode() const
void FindBreakLocationFromPosition(int position, BreakPositionAlignment alignment)
bool IsDebuggerStatement()
void SetDebugBreakAtReturn()
Code * builtin(Name name)
static int ExtractArgcFromMinorKey(int minor_key)
static int ExtractArgcFromMinorKey(int minor_key)
bool is_compare_ic_stub()
static Code * GetCodeFromTargetAddress(Address address)
ExtraICState extra_ic_state()
bool is_inline_cache_stub()
int SourceStatementPosition(Address pc)
byte * instruction_start()
bool is_to_boolean_ic_stub()
bool has_debug_break_slots()
Vector< uint16_t > text() const
static CommandMessage New(const Vector< uint16_t > &command, v8::Debug::ClientData *data)
v8::Debug::ClientData * client_data() const
v8::Debug::ClientData * client_data_
static MUST_USE_RESULT MaybeHandle< Code > GetDebugCode(Handle< JSFunction > function)
static bool EnsureCompiled(Handle< JSFunction > function, ClearExceptionFlag flag)
static MUST_USE_RESULT MaybeHandle< Code > GetUnoptimizedCode(Handle< JSFunction > function)
static Handle< SharedFunctionInfo > CompileScript(Handle< String > source, Handle< Object > script_name, int line_offset, int column_offset, bool is_shared_cross_origin, Handle< Context > context, v8::Extension *extension, ScriptData **cached_data, ScriptCompiler::CompileOptions compile_options, NativesFlag is_natives_code)
Handle< DebugInfo > debug_info_
virtual ~DebugInfoListNode()
void set_next(DebugInfoListNode *next)
DebugInfoListNode * next()
Handle< DebugInfo > debug_info()
DebugInfoListNode(DebugInfo *debug_info)
static Object * FindBreakPointInfo(Handle< DebugInfo > debug_info, Handle< Object > break_point_object)
static void ClearBreakPoint(Handle< DebugInfo > debug_info, int code_position, Handle< Object > break_point_object)
static void SetBreakPoint(Handle< DebugInfo > debug_info, int code_position, int source_position, int statement_position, Handle< Object > break_point_object)
StepAction last_step_action_
Object ** restarter_frame_function_pointer_
LiveEdit::FrameDropMode frame_drop_mode_
DebugScope * current_debug_scope_
int last_statement_position_
StackFrame::Id break_frame_id_
static bool HasDebugInfo(Handle< SharedFunctionInfo > shared)
Handle< Context > GetDebugContext()
void OnException(Handle< Object > exception, bool uncaught, Handle< Object > promise)
MUST_USE_RESULT MaybeHandle< Object > MakeAsyncTaskEvent(Handle< JSObject > task_event)
bool ignore_events() const
static void HandleWeakDebugInfo(const v8::WeakCallbackData< v8::Value, void > &data)
void OnThrow(Handle< Object > exception, bool uncaught)
void AssertDebugContext()
void EnqueueCommandMessage(Vector< const uint16_t > command, v8::Debug::ClientData *client_data=NULL)
void ActivateStepIn(StackFrame *frame)
Handle< Object > event_listener_data_
bool EnsureDebugInfo(Handle< SharedFunctionInfo > shared, Handle< JSFunction > function)
void PrepareForBreakPoints()
void ClearAllBreakPoints()
void HandleStepIn(Handle< JSFunction > function, Handle< Object > holder, Address fp, bool is_constructor)
ScriptCache * script_cache_
void ActivateStepOut(StackFrame *frame)
static void RecordEvalCaller(Handle< Script > script)
void OnAsyncTaskEvent(Handle< JSObject > data)
MUST_USE_RESULT MaybeHandle< Object > MakeBreakEvent(Handle< Object > break_points_hit)
Address after_break_target_
LockingCommandMessageQueue event_command_queue_
MUST_USE_RESULT MaybeHandle< Object > Call(Handle< JSFunction > fun, Handle< Object > data)
void Break(Arguments args, JavaScriptFrame *)
Handle< Object > event_listener_
void InvokeMessageHandler(MessageImpl message)
ThreadLocal thread_local_
void RemoveDebugInfo(Handle< DebugInfo > debug_info)
bool PromiseHasRejectHandler(Handle< JSObject > promise)
void SetMessageHandler(v8::Debug::MessageHandler handler)
DebugScope * debugger_entry()
friend class SuppressDebug
MUST_USE_RESULT MaybeHandle< Object > MakeExecutionState()
bool has_commands() const
StackFrame::Id break_frame_id()
MUST_USE_RESULT MaybeHandle< Object > MakeJSObject(const char *constructor_name, int argc, Handle< Object > argv[])
char * ArchiveDebug(char *to)
static Handle< DebugInfo > GetDebugInfo(Handle< SharedFunctionInfo > shared)
void ChangeBreakOnException(ExceptionBreakType type, bool enable)
v8::Debug::MessageHandler message_handler_
Object * FindSharedFunctionInfoInScript(Handle< Script > script, int position)
bool CheckBreakPoint(Handle< Object > break_point_object)
static Handle< Object > GetSourceBreakLocations(Handle< SharedFunctionInfo > shared, BreakPositionAlignment position_aligment)
LockingCommandMessageQueue command_queue_
void OnAfterCompile(Handle< Script > script)
void FloodBoundFunctionWithOneShot(Handle< JSFunction > function)
bool break_on_uncaught_exception_
void OnCompileError(Handle< Script > script)
void ProcessDebugEvent(v8::DebugEvent event, Handle< JSObject > event_data, bool auto_continue)
void FloodWithOneShot(Handle< JSFunction > function)
void OnDebugBreak(Handle< Object > break_points_hit, bool auto_continue)
bool SetBreakPoint(Handle< JSFunction > function, Handle< Object > break_point_object, int *source_position)
void SetEventListener(Handle< Object > callback, Handle< Object > data)
void ClearBreakPoint(Handle< Object > break_point_object)
bool SetBreakPointForScript(Handle< Script > script, Handle< Object > break_point_object, int *source_position, BreakPositionAlignment alignment)
friend class DisableBreak
bool IsDebugGlobal(GlobalObject *global)
void ProcessDebugMessages(bool debug_command_only)
bool in_debug_scope() const
void OnBeforeCompile(Handle< Script > script)
void SetAfterBreakTarget(JavaScriptFrame *frame)
void PrepareStep(StepAction step_action, int step_count, StackFrame::Id frame_id)
void OnPromiseReject(Handle< JSObject > promise, Handle< Object > value)
void FloodHandlerWithOneShot()
void OnPromiseEvent(Handle< JSObject > data)
MUST_USE_RESULT MaybeHandle< Object > MakeCompileEvent(Handle< Script > script, v8::DebugEvent type)
DebugInfoListNode * debug_info_list_
static bool CompileDebuggerScript(Isolate *isolate, int index)
void NotifyMessageHandler(v8::DebugEvent event, Handle< JSObject > exec_state, Handle< JSObject > event_data, bool auto_continue)
Handle< Context > debug_context_
static int ArchiveSpacePerThread()
char * RestoreDebug(char *from)
MUST_USE_RESULT MaybeHandle< Object > MakePromiseEvent(Handle< JSObject > promise_event)
void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id, LiveEdit::FrameDropMode mode, Object **restarter_frame_function_pointer)
Handle< Context > debug_context()
base::Semaphore command_received_
bool IsBreakOnException(ExceptionBreakType type)
Handle< FixedArray > GetLoadedScripts()
void CallEventCallback(v8::DebugEvent event, Handle< Object > exec_state, Handle< Object > event_data, v8::Debug::ClientData *client_data)
MUST_USE_RESULT MaybeHandle< Object > MakeExceptionEvent(Handle< Object > exception, bool uncaught, Handle< Object > promise)
static bool IsDebugBreak(Address addr)
bool IsBreakAtReturn(JavaScriptFrame *frame)
Handle< Object > CheckBreakPoints(Handle< Object > break_point)
void EnqueueDebugCommand(v8::Debug::ClientData *client_data=NULL)
bool StepNextContinue(BreakLocationIterator *break_location_iterator, JavaScriptFrame *frame)
static void DeoptimizeAll(Isolate *isolate)
EventDetailsImpl(DebugEvent event, Handle< JSObject > exec_state, Handle< JSObject > event_data, Handle< Object > callback_data, v8::Debug::ClientData *client_data)
Handle< JSObject > event_data_
Handle< Object > callback_data_
virtual DebugEvent GetEvent() const
Event type.
virtual v8::Handle< v8::Object > GetEventData() const
virtual v8::Handle< v8::Object > GetExecutionState() const
Access to execution state and event data of the debug event.
virtual v8::Handle< v8::Value > GetCallbackData() const
Client data passed with the corresponding callback when it was registered.
virtual v8::Handle< v8::Context > GetEventContext() const
Get the context active when the debug event happened.
virtual v8::Debug::ClientData * GetClientData() const
Client data passed to DebugBreakForCommand function.
Handle< JSObject > exec_state_
v8::Debug::ClientData * client_data_
static void MakeWeak(Object **location, void *parameter, WeakCallback weak_callback)
static void * ClearWeakness(Object **location)
static void Destroy(Object **location)
Handle< Object > Create(Object *value)
static Handle< T > cast(Handle< S > that)
static Handle< T > null()
static const int kMakeHeapIterableMask
static const int kNoGCFlags
void CollectAllGarbage(int flags, const char *gc_reason=NULL, const GCCallbackFlags gc_callback_flags=kNoGCCallbackFlags)
Handle< GlobalObject > global_object()
void clear_scheduled_exception()
bool has_scheduled_exception()
Object * scheduled_exception()
StackGuard * stack_guard()
Handle< Context > native_context()
void set_context(Context *context)
Handle< JSBuiltinsObject > js_builtins_object()
OptimizingCompilerThread * optimizing_compiler_thread()
ThreadLocalTop * thread_local_top()
ThreadManager * thread_manager()
Handle< Object > GetPromiseOnStackOnThrow()
void set_pending_exception(Object *exception_obj)
JSObject * global_proxy()
bool concurrent_recompilation_enabled()
void clear_pending_exception()
CompilationCache * compilation_cache()
void ComputeLocation(MessageLocation *target)
GlobalHandles * global_handles()
Bootstrapper * bootstrapper()
bool has_pending_exception()
static const int kBoundFunctionIndex
void set_continuation(int continuation)
static Handle< Object > GetDataProperty(Handle< JSObject > object, Handle< Name > key)
virtual void GetFunctions(List< JSFunction * > *functions)
JSFunction * function() const
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
static bool SetAfterBreakTarget(Debug *debug)
static void InitializeThreadLocal(Debug *debug)
void DebugTag(const char *call_site_tag)
static void ReportMessage(Isolate *isolate, MessageLocation *loc, Handle< Object > message)
static Handle< JSMessageObject > MakeMessageObject(Isolate *isolate, const char *type, MessageLocation *loc, Vector< Handle< Object > > args, Handle< JSArray > stack_frames)
virtual bool WillStartRunning() const
Indicate whether this is a response to a continue command which will start the VM running after this ...
virtual bool IsResponse() const
virtual DebugEvent GetEvent() const
virtual v8::Handle< v8::Object > GetEventData() const
static MessageImpl NewResponse(DebugEvent event, bool running, Handle< JSObject > exec_state, Handle< JSObject > event_data, Handle< String > response_json, v8::Debug::ClientData *client_data)
virtual v8::Debug::ClientData * GetClientData() const
Client data passed with the corresponding request if any.
Handle< String > response_json_
Handle< JSObject > event_data_
virtual v8::Isolate * GetIsolate() const
virtual v8::Handle< v8::Context > GetEventContext() const
Get the context active when the debug event happened.
virtual v8::Handle< v8::Object > GetExecutionState() const
Access to execution state and event data.
virtual v8::Handle< v8::String > GetJSON() const
Get the debugger protocol JSON.
Handle< JSObject > exec_state_
MessageImpl(bool is_event, DebugEvent event, bool running, Handle< JSObject > exec_state, Handle< JSObject > event_data, Handle< String > response_json, v8::Debug::ClientData *client_data)
v8::Debug::ClientData * client_data_
static MessageImpl NewEvent(DebugEvent event, bool running, Handle< JSObject > exec_state, Handle< JSObject > event_data)
virtual bool IsEvent() const
Check type of message.
static Vector< const char > GetScriptName(int index)
static int GetIndex(const char *name)
static MUST_USE_RESULT MaybeHandle< Object > GetProperty(LookupIterator *it)
static MUST_USE_RESULT MaybeHandle< Object > SetProperty(Handle< Object > object, Handle< Name > key, Handle< Object > value, StrictMode strict_mode, StoreFromKeyed store_mode=MAY_BE_STORE_FROM_KEYED)
static int ModeMask(Mode mode)
static bool IsDebugBreakSlot(Mode mode)
static bool IsJSReturn(Mode mode)
static bool IsPosition(Mode mode)
static bool IsCodeTarget(Mode mode)
static bool IsConstPool(Mode mode)
static bool IsConstructCall(Mode mode)
static bool IsStatementPosition(Mode mode)
static const int kNoPosition
Handle< FixedArray > GetScripts()
static void HandleWeakScript(const v8::WeakCallbackData< v8::Value, void > &data)
ScriptCache(Isolate *isolate)
static uint32_t Hash(int key)
void Add(Handle< Script > script)
static Handle< JSObject > GetWrapper(Handle< Script > script)
static Smi * FromInt(int value)
StackFrame * frame() const
Object * GetExpression(int index) const
int ComputeExpressionsCount() const
Entry * Next(Entry *p) const
uint32_t occupancy() const
Entry * Lookup(void *key, uint32_t hash, bool insert, FreeStoreAllocationPolicy allocator=FreeStoreAllocationPolicy())
void * Remove(void *key, uint32_t hash)
void IterateArchivedThreads(ThreadVisitor *v)
Vector< T > Clone() const
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions true
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define RETURN_ON_EXCEPTION_VALUE(isolate, call, value)
#define DCHECK_LE(v1, v2)
#define DCHECK(condition)
#define DCHECK_LT(v1, v2)
#define DCHECK_EQ(v1, v2)
void DeleteArray(T *array)
static void RecompileAndRelocateSuspendedGenerators(const List< Handle< JSGeneratorObject > > &generators)
static int ComputeCodeOffsetFromPcOffset(Code *code, int pc_offset)
static v8::Handle< v8::Context > GetDebugEventContext(Isolate *isolate)
Handle< T > handle(T *t, Isolate *isolate)
static Handle< Code > DebugBreakForIC(Handle< Code > code, RelocInfo::Mode mode)
static bool IsSourceBreakStub(Code *code)
void PrintF(const char *format,...)
static void RedirectActivationsToRecompiledCodeOnThread(Isolate *isolate, ThreadLocalTop *top)
void MemCopy(void *dest, const void *src, size_t size)
static void CollectActiveFunctionsFromThread(Isolate *isolate, ThreadLocalTop *top, List< Handle< JSFunction > > *active_functions, Object *active_code_marker)
static bool IsBreakStub(Code *code)
static int ComputePcOffsetFromCodeOffset(Code *code, int code_offset)
static void EnsureFunctionHasDebugBreakSlots(Handle< JSFunction > function)
Debugger support for the V8 JavaScript engine.
#define STATIC_CHAR_VECTOR(x)