V8 Project
|
#include <debug.h>
Classes | |
class | ThreadLocal |
Static Public Member Functions | |
static Handle< DebugInfo > | GetDebugInfo (Handle< SharedFunctionInfo > shared) |
static bool | HasDebugInfo (Handle< SharedFunctionInfo > shared) |
static bool | IsDebugBreak (Address addr) |
static bool | IsDebugBreakAtReturn (RelocInfo *rinfo) |
static Handle< Object > | GetSourceBreakLocations (Handle< SharedFunctionInfo > shared, BreakPositionAlignment position_aligment) |
static void | HandleWeakDebugInfo (const v8::WeakCallbackData< v8::Value, void > &data) |
static int | ArchiveSpacePerThread () |
static void | RecordEvalCaller (Handle< Script > script) |
Static Private Member Functions | |
static bool | CompileDebuggerScript (Isolate *isolate, int index) |
Private Attributes | |
Handle< Context > | debug_context_ |
Handle< Object > | event_listener_ |
Handle< Object > | event_listener_data_ |
v8::Debug::MessageHandler | message_handler_ |
base::Semaphore | command_received_ |
LockingCommandMessageQueue | command_queue_ |
LockingCommandMessageQueue | event_command_queue_ |
bool | is_active_ |
bool | is_suppressed_ |
bool | live_edit_enabled_ |
bool | has_break_points_ |
bool | break_disabled_ |
bool | break_on_exception_ |
bool | break_on_uncaught_exception_ |
ScriptCache * | script_cache_ |
DebugInfoListNode * | debug_info_list_ |
Address | after_break_target_ |
ThreadLocal | thread_local_ |
Isolate * | isolate_ |
Static Private Attributes | |
static const int | kQueueInitialSize = 4 |
Friends | |
class | Isolate |
class | DebugScope |
class | DisableBreak |
class | LiveEdit |
class | SuppressDebug |
Handle< FixedArray > | GetDebuggedFunctions () |
void | CheckDebuggerUnloaded (bool check_functions) |
|
explicitprivate |
Definition at line 30 of file debug.cc.
References ThreadInit().
|
private |
Definition at line 1675 of file debug.cc.
References DCHECK, v8::internal::Debug::ThreadLocal::step_into_fp_, StepOutActive(), and thread_local_.
Referenced by PrepareStep().
|
private |
Definition at line 1686 of file debug.cc.
References DCHECK, v8::internal::Debug::ThreadLocal::step_out_fp_, StepInActive(), and thread_local_.
Referenced by PrepareStep().
|
inline |
char * v8::internal::Debug::ArchiveDebug | ( | char * | to | ) |
Definition at line 571 of file debug.cc.
References ArchiveSpacePerThread(), v8::internal::MemCopy(), thread_local_, ThreadInit(), and to().
Referenced by v8::internal::ThreadManager::EagerlyArchiveThread().
|
static |
Definition at line 586 of file debug.cc.
Referenced by ArchiveDebug(), v8::internal::ArchiveSpacePerThread(), and RestoreDebug().
|
inlineprivate |
Definition at line 559 of file debug.h.
References v8::internal::Isolate::context(), DCHECK, debug_context(), in_debug_scope(), and isolate_.
Referenced by ClearMirrorCache(), MakeJSObject(), and OnDebugBreak().
void v8::internal::Debug::Break | ( | Arguments | args, |
JavaScriptFrame * | frame | ||
) |
Definition at line 866 of file debug.cc.
References v8::internal::ALL_BREAK_LOCATIONS, break_disabled_, v8::internal::BreakLocationIterator::BreakPointObjects(), CHECK, CheckBreakPoints(), ClearStepping(), DCHECK, DebugScope, v8::internal::BreakLocationIterator::FindBreakLocationFromAddress(), v8::internal::JavaScriptFrame::function(), GetDebugInfo(), v8::internal::BreakLocationIterator::HasBreakPoint(), v8::internal::Isolate::heap(), v8::internal::LiveEdit::InitializeThreadLocal(), isolate_, v8::internal::Debug::ThreadLocal::last_fp_, v8::internal::Debug::ThreadLocal::last_step_action_, OnDebugBreak(), PrepareStep(), v8::internal::Debug::ThreadLocal::queued_step_count_, v8::internal::Debug::ThreadLocal::step_count_, v8::internal::Debug::ThreadLocal::step_out_fp_, v8::internal::StepNext, StepNextContinue(), v8::internal::StepNone, v8::internal::StepOut, StepOutActive(), and thread_local_.
|
inline |
Definition at line 473 of file debug.h.
References v8::internal::Debug::ThreadLocal::break_frame_id_, and thread_local_.
Referenced by v8::internal::DropActivationsInActiveThreadImpl(), FloodHandlerWithOneShot(), and PrepareStep().
|
inline |
Definition at line 474 of file debug.h.
References v8::internal::Debug::ThreadLocal::break_id_, and thread_local_.
Referenced by CheckBreakPoint(), v8::internal::CheckExecutionState(), MakeBreakEvent(), MakeExceptionEvent(), and MakeExecutionState().
MaybeHandle< Object > v8::internal::Debug::Call | ( | Handle< JSFunction > | fun, |
Handle< Object > | data | ||
) |
Definition at line 3004 of file debug.cc.
References arraysize, debug_context(), DebugScope, v8::internal::Isolate::factory(), isolate_, and MakeExecutionState().
Referenced by v8::Debug::Call().
|
private |
Definition at line 2748 of file debug.cc.
References arraysize, DCHECK, event_listener_, event_listener_data_, v8::internal::Smi::FromInt(), v8::internal::Isolate::global_proxy(), v8::internal::Isolate::has_scheduled_exception(), and isolate_.
Referenced by ProcessDebugEvent().
void v8::internal::Debug::ChangeBreakOnException | ( | ExceptionBreakType | type, |
bool | enable | ||
) |
Definition at line 1247 of file debug.cc.
References break_on_exception_, break_on_uncaught_exception_, and v8::internal::BreakUncaughtException.
Definition at line 1027 of file debug.cc.
References arraysize, break_id(), v8::internal::Handle< T >::cast(), debug_context(), v8::internal::Isolate::factory(), v8::internal::Object::GetProperty(), isolate_, v8::internal::Isolate::js_builtins_object(), and STATIC_CHAR_VECTOR.
Referenced by CheckBreakPoints().
Definition at line 991 of file debug.cc.
References CheckBreakPoint(), DCHECK, v8::internal::Isolate::factory(), v8::internal::Smi::FromInt(), and isolate_.
Referenced by Break().
void v8::internal::Debug::ClearAllBreakPoints | ( | ) |
Definition at line 1181 of file debug.cc.
References v8::internal::ALL_BREAK_LOCATIONS, v8::internal::BreakLocationIterator::ClearAllDebugBreak(), v8::internal::DebugInfoListNode::debug_info(), debug_info_list_, v8::internal::DebugInfoListNode::next(), NULL, and RemoveDebugInfo().
Referenced by Unload().
Definition at line 1150 of file debug.cc.
References v8::internal::BreakLocationIterator::ClearBreakPoint(), v8::internal::DebugInfoListNode::debug_info(), debug_info_list_, v8::internal::BreakLocationIterator::FindBreakLocationFromAddress(), v8::internal::DebugInfo::FindBreakPointInfo(), isolate_, v8::internal::DebugInfoListNode::next(), NULL, RemoveDebugInfo(), and v8::internal::SOURCE_BREAK_LOCATIONS.
|
private |
Definition at line 2389 of file debug.cc.
References AssertDebugContext(), v8::internal::Isolate::factory(), v8::internal::FAST_ELEMENTS, v8::internal::Smi::FromInt(), v8::internal::Isolate::global_object(), v8::internal::handle(), isolate_, v8::internal::Object::SetProperty(), and v8::internal::SLOPPY.
|
private |
Definition at line 1658 of file debug.cc.
References v8::internal::ALL_BREAK_LOCATIONS, v8::internal::BreakLocationIterator::ClearOneShot(), v8::internal::DebugInfoListNode::debug_info(), debug_info_list_, v8::internal::BreakLocationIterator::Done(), v8::internal::BreakLocationIterator::Next(), v8::internal::DebugInfoListNode::next(), and NULL.
Referenced by ClearStepping().
|
private |
Definition at line 1681 of file debug.cc.
References v8::internal::Debug::ThreadLocal::step_into_fp_, and thread_local_.
Referenced by ClearStepping().
|
private |
Definition at line 1697 of file debug.cc.
References v8::internal::RelocInfo::kNoPosition, v8::internal::Debug::ThreadLocal::last_fp_, v8::internal::Debug::ThreadLocal::last_statement_position_, v8::internal::Debug::ThreadLocal::last_step_action_, v8::internal::StepNone, and thread_local_.
Referenced by ClearStepping().
void v8::internal::Debug::ClearStepOut | ( | ) |
Definition at line 1692 of file debug.cc.
References v8::internal::Debug::ThreadLocal::step_out_fp_, and thread_local_.
Referenced by ClearStepping(), and v8::internal::RUNTIME_FUNCTION().
void v8::internal::Debug::ClearStepping | ( | ) |
Definition at line 1643 of file debug.cc.
References ClearOneShot(), ClearStepIn(), ClearStepNext(), ClearStepOut(), v8::internal::Debug::ThreadLocal::step_count_, and thread_local_.
Referenced by Break(), v8::internal::DebugEvaluate(), v8::internal::Invoke(), OnException(), and Unload().
Definition at line 728 of file debug.cc.
References v8::internal::Isolate::bootstrapper(), v8::internal::Isolate::clear_pending_exception(), v8::internal::Compiler::CompileScript(), v8::internal::Isolate::ComputeLocation(), DCHECK, v8::internal::Isolate::factory(), v8::internal::Smi::FromInt(), v8::internal::NativesCollection< type >::GetScriptName(), v8::internal::handle(), v8::internal::Isolate::has_pending_exception(), v8::internal::MaybeHandle< T >::is_null(), v8::internal::Handle< T >::is_null(), v8::ScriptCompiler::kNoCompileOptions, v8::internal::MessageHandler::MakeMessageObject(), name, v8::internal::Isolate::native_context(), v8::internal::NATIVES_CODE, NULL, v8::internal::MessageHandler::ReportMessage(), v8::internal::Isolate::set_pending_exception(), and v8::internal::Script::TYPE_NATIVE.
Referenced by Load().
Definition at line 459 of file debug.h.
References debug_context_.
Referenced by AssertDebugContext(), Call(), CheckBreakPoint(), v8::internal::CheckExecutionState(), v8::internal::Isolate::GetCallingNativeContext(), GetDebugContext(), v8::Debug::GetMirror(), v8::Shell::InstallUtilityScript(), IsDebugGlobal(), MakeJSObject(), and OnAfterCompile().
|
inline |
Definition at line 458 of file debug.h.
References v8::internal::Debug::ThreadLocal::current_debug_scope_, and thread_local_.
Referenced by v8::internal::GetDebugEventContext().
|
private |
void v8::internal::Debug::EnqueueCommandMessage | ( | Vector< const uint16_t > | command, |
v8::Debug::ClientData * | client_data = NULL |
||
) |
Definition at line 2979 of file debug.cc.
References command_queue_, command_received_, v8::internal::Logger::DebugTag(), in_debug_scope(), isolate_, v8::internal::Vector< T >::length(), v8::internal::Isolate::logger(), v8::internal::CommandMessage::New(), v8::internal::Isolate::stack_guard(), and v8::internal::Vector< T >::start().
Referenced by v8::Debug::SendCommand(), and SetMessageHandler().
void v8::internal::Debug::EnqueueDebugCommand | ( | v8::Debug::ClientData * | client_data = NULL | ) |
Definition at line 2995 of file debug.cc.
References event_command_queue_, in_debug_scope(), isolate_, v8::internal::CommandMessage::New(), and v8::internal::Isolate::stack_guard().
Referenced by v8::Debug::DebugBreakForCommand().
bool v8::internal::Debug::EnsureDebugInfo | ( | Handle< SharedFunctionInfo > | shared, |
Handle< JSFunction > | function | ||
) |
Definition at line 2177 of file debug.cc.
References v8::internal::CLEAR_EXCEPTION, DCHECK, debug_info_list_, v8::internal::Compiler::EnsureCompiled(), v8::internal::Isolate::factory(), has_break_points_, HasDebugInfo(), and v8::internal::DebugInfoListNode::set_next().
Referenced by FloodWithOneShot(), IsBreakAtReturn(), PrepareStep(), v8::internal::ScopeIterator::ScopeIterator(), SetAfterBreakTarget(), SetBreakPoint(), and SetBreakPointForScript().
Object * v8::internal::Debug::FindSharedFunctionInfoInScript | ( | Handle< Script > | script, |
int | position | ||
) |
Definition at line 2071 of file debug.cc.
References DCHECK, v8::internal::Compiler::GetUnoptimizedCode(), has_break_points_, v8::internal::Isolate::heap(), v8::internal::MaybeHandle< T >::is_null(), v8::internal::Handle< T >::is_null(), isolate_, v8::internal::RelocInfo::kNoPosition, and NULL.
Referenced by SetBreakPointForScript().
void v8::internal::Debug::FloodBoundFunctionWithOneShot | ( | Handle< JSFunction > | function | ) |
Definition at line 1216 of file debug.cc.
References FloodWithOneShot(), v8::internal::Handle< T >::is_null(), isolate_, and v8::internal::JSFunction::kBoundFunctionIndex.
Referenced by HandleStepIn(), and PrepareStep().
void v8::internal::Debug::FloodHandlerWithOneShot | ( | ) |
Definition at line 1229 of file debug.cc.
References break_frame_id(), FloodWithOneShot(), v8::internal::JavaScriptFrame::function(), and isolate_.
Referenced by PrepareStep().
void v8::internal::Debug::FloodWithOneShot | ( | Handle< JSFunction > | function | ) |
Definition at line 1197 of file debug.cc.
References v8::internal::ALL_BREAK_LOCATIONS, v8::internal::BreakLocationIterator::Done(), EnsureDebugInfo(), GetDebugInfo(), v8::internal::BreakLocationIterator::Next(), PrepareForBreakPoints(), and v8::internal::BreakLocationIterator::SetOneShot().
Referenced by FloodBoundFunctionWithOneShot(), FloodHandlerWithOneShot(), HandleStepIn(), PrepareStep(), and v8::internal::RUNTIME_FUNCTION().
void v8::internal::Debug::FramesHaveBeenDropped | ( | StackFrame::Id | new_break_frame_id, |
LiveEdit::FrameDropMode | mode, | ||
Object ** | restarter_frame_function_pointer | ||
) |
Definition at line 2372 of file debug.cc.
References v8::internal::Debug::ThreadLocal::break_frame_id_, v8::internal::LiveEdit::CURRENTLY_SET_MODE, v8::internal::Debug::ThreadLocal::frame_drop_mode_, mode(), v8::internal::Debug::ThreadLocal::restarter_frame_function_pointer_, and thread_local_.
Referenced by v8::internal::DropActivationsInActiveThreadImpl().
|
inline |
Definition at line 452 of file debug.h.
Referenced by v8::internal::ThreadManager::FreeThreadResources().
Definition at line 2778 of file debug.cc.
References debug_context(), DebugScope, v8::internal::handle(), and isolate_.
|
static |
Definition at line 1069 of file debug.cc.
References DCHECK, and HasDebugInfo().
Referenced by Break(), FloodWithOneShot(), v8::internal::IC::GetOriginalCode(), GetSourceBreakLocations(), IsBreakAtReturn(), PrepareStep(), v8::internal::RUNTIME_FUNCTION(), v8::internal::ScopeIterator::ScopeIterator(), SetAfterBreakTarget(), SetBreakPoint(), and SetBreakPointForScript().
Handle< FixedArray > v8::internal::Debug::GetLoadedScripts | ( | ) |
Definition at line 2404 of file debug.cc.
References v8::internal::Heap::CollectAllGarbage(), v8::internal::ScriptCache::GetScripts(), v8::internal::Isolate::heap(), isolate_, v8::internal::Heap::kNoGCFlags, NULL, and script_cache_.
|
static |
Definition at line 1551 of file debug.cc.
References v8::internal::BREAK_POSITION_ALIGNED, v8::internal::Isolate::factory(), v8::internal::BreakPointInfo::GetBreakPointCount(), GetDebugInfo(), HasDebugInfo(), v8::internal::Isolate::heap(), v8::internal::STATEMENT_ALIGNED, and UNREACHABLE.
Referenced by v8::internal::RUNTIME_FUNCTION().
void v8::internal::Debug::HandleDebugBreak | ( | ) |
Definition at line 3024 of file debug.cc.
References v8::internal::Isolate::bootstrapper(), break_disabled_, DCHECK, is_active(), IsDebugGlobal(), isolate_, ProcessDebugMessages(), and v8::internal::Isolate::stack_guard().
void v8::internal::Debug::HandleStepIn | ( | Handle< JSFunction > | function, |
Handle< Object > | holder, | ||
Address | fp, | ||
bool | is_constructor | ||
) |
Definition at line 1593 of file debug.cc.
References v8::internal::StackFrameIterator::Advance(), v8::internal::Builtins::builtin(), v8::internal::Isolate::builtins(), v8::internal::Handle< T >::cast(), DCHECK, FloodBoundFunctionWithOneShot(), FloodWithOneShot(), v8::internal::fp, v8::internal::StackFrameIterator::frame(), v8::internal::Handle< T >::is_null(), v8::internal::Debug::ThreadLocal::step_into_fp_, and thread_local_.
Referenced by v8::internal::Object::GetPropertyWithDefinedGetter(), v8::internal::Runtime_NewObjectHelper(), and v8::internal::Object::SetPropertyWithDefinedSetter().
|
static |
Definition at line 691 of file debug.cc.
References v8::internal::ALL_BREAK_LOCATIONS, v8::internal::BreakLocationIterator::ClearAllDebugBreak(), DCHECK, v8::internal::DebugInfoListNode::debug_info(), debug_info_list_, v8::WeakCallbackData< T, P >::GetIsolate(), v8::WeakCallbackData< T, P >::GetParameter(), NULL, and RemoveDebugInfo().
Referenced by v8::internal::DebugInfoListNode::DebugInfoListNode().
|
inline |
Definition at line 467 of file debug.h.
References has_break_points_.
Referenced by v8::internal::IC::address(), v8::internal::IC::constant_pool(), and v8::internal::RelocInfo::Visit().
|
inlineprivate |
Definition at line 504 of file debug.h.
References command_queue_.
Referenced by NotifyMessageHandler().
|
static |
Definition at line 1062 of file debug.cc.
Referenced by EnsureDebugInfo(), GetDebugInfo(), v8::internal::IC::GetOriginalCode(), and GetSourceBreakLocations().
|
inlineprivate |
Definition at line 505 of file debug.h.
References is_active_, and is_suppressed_.
Referenced by OnAfterCompile(), OnAsyncTaskEvent(), OnBeforeCompile(), OnCompileError(), OnDebugBreak(), OnPromiseEvent(), OnPromiseReject(), and OnThrow().
|
inline |
Definition at line 468 of file debug.h.
References v8::internal::Debug::ThreadLocal::current_debug_scope_, NULL, and thread_local_.
Referenced by AssertDebugContext(), EnqueueCommandMessage(), EnqueueDebugCommand(), v8::internal::Isolate::GetCallingNativeContext(), NotifyMessageHandler(), OnAfterCompile(), OnAsyncTaskEvent(), OnBeforeCompile(), OnCompileError(), OnPromiseEvent(), OnPromiseReject(), OnThrow(), PrepareStep(), SetMessageHandler(), and UpdateState().
|
private |
Definition at line 2970 of file debug.cc.
References message_handler_, and NULL.
Referenced by NotifyMessageHandler().
|
inline |
Definition at line 465 of file debug.h.
References is_active_.
Referenced by HandleDebugBreak(), v8::internal::CompilationInfo::Initialize(), v8::internal::Invoke(), and NotifyMessageHandler().
|
inline |
Definition at line 477 of file debug.h.
References is_active_.
|
inline |
Definition at line 466 of file debug.h.
References debug_context_.
Referenced by v8::internal::Compiler::CompileScript(), IsDebugGlobal(), Load(), Unload(), and UpdateState().
bool v8::internal::Debug::IsBreakAtReturn | ( | JavaScriptFrame * | frame | ) |
Definition at line 2329 of file debug.cc.
References v8::internal::Assembler::break_address_from_return_address(), DCHECK, v8::internal::RelocIterator::done(), EnsureDebugInfo(), v8::internal::JavaScriptFrame::function(), GetDebugInfo(), has_break_points_, v8::internal::RelocInfo::IsJSReturn(), isolate_, v8::internal::Assembler::kPatchReturnSequenceAddressOffset, v8::internal::RelocIterator::next(), v8::internal::RelocInfo::pc(), PrepareForBreakPoints(), v8::internal::RelocIterator::rinfo(), and v8::internal::RelocInfo::rmode().
bool v8::internal::Debug::IsBreakOnException | ( | ExceptionBreakType | type | ) |
Definition at line 1256 of file debug.cc.
References break_on_exception_, break_on_uncaught_exception_, and v8::internal::BreakUncaughtException.
Definition at line 1541 of file debug.cc.
References v8::internal::DEBUG_BREAK, v8::internal::Code::extra_ic_state(), v8::internal::Code::GetCodeFromTargetAddress(), and v8::internal::Code::is_debug_stub().
Referenced by v8::internal::IC::address(), v8::internal::IC::constant_pool(), v8::internal::BreakLocationIterator::IsDebugBreak(), and SetAfterBreakTarget().
bool v8::internal::Debug::IsDebugGlobal | ( | GlobalObject * | global | ) |
Definition at line 2384 of file debug.cc.
References debug_context(), and is_loaded().
Referenced by HandleDebugBreak(), and v8::internal::V8HeapExplorer::SetGcSubrootReference().
|
inline |
Definition at line 399 of file debug.h.
References v8::internal::Debug::ThreadLocal::step_count_, and thread_local_.
Referenced by v8::internal::RUNTIME_FUNCTION().
|
inline |
Definition at line 461 of file debug.h.
References live_edit_enabled_.
bool v8::internal::Debug::Load | ( | ) |
Definition at line 789 of file debug.cc.
References v8::internal::Isolate::bootstrapper(), v8::internal::Handle< T >::cast(), CompileDebuggerScript(), v8::internal::GlobalHandles::Create(), debug_context_, DisableBreak, v8::internal::Isolate::factory(), v8::internal::NativesCollection< type >::GetIndex(), v8::internal::Isolate::global_handles(), is_loaded(), v8::internal::Handle< T >::is_null(), is_suppressed_, isolate_, RETURN_ON_EXCEPTION_VALUE, v8::internal::Isolate::set_context(), v8::internal::Object::SetProperty(), v8::internal::SLOPPY, STATIC_CHAR_VECTOR, and SuppressDebug.
Referenced by v8::Debug::GetMirror(), v8::Shell::InstallUtilityScript(), and UpdateState().
|
private |
Definition at line 2497 of file debug.cc.
References arraysize, and MakeJSObject().
Referenced by OnAsyncTaskEvent().
|
private |
Definition at line 2460 of file debug.cc.
References arraysize, break_id(), v8::internal::Isolate::factory(), isolate_, and MakeJSObject().
Referenced by OnDebugBreak().
|
private |
Definition at line 2480 of file debug.cc.
References arraysize, v8::internal::Isolate::factory(), v8::internal::Script::GetWrapper(), isolate_, and MakeJSObject().
Referenced by OnAfterCompile(), OnBeforeCompile(), and OnCompileError().
|
private |
Definition at line 2468 of file debug.cc.
References arraysize, break_id(), v8::internal::Isolate::factory(), isolate_, and MakeJSObject().
Referenced by OnException().
|
private |
Definition at line 2453 of file debug.cc.
References arraysize, break_id(), v8::internal::Isolate::factory(), isolate_, and MakeJSObject().
Referenced by Call(), and ProcessDebugEvent().
|
private |
Definition at line 2434 of file debug.cc.
References AssertDebugContext(), DCHECK, debug_context(), v8::internal::Object::GetProperty(), v8::internal::Isolate::global_object(), v8::internal::handle(), and isolate_.
Referenced by MakeAsyncTaskEvent(), MakeBreakEvent(), MakeCompileEvent(), MakeExceptionEvent(), MakeExecutionState(), and MakePromiseEvent().
|
private |
Definition at line 2490 of file debug.cc.
References arraysize, and MakeJSObject().
Referenced by OnPromiseEvent().
|
private |
Definition at line 2785 of file debug.cc.
References v8::AfterCompile, v8::BeforeCompile, v8::Break, v8::BreakForCommand, v8::internal::Handle< T >::cast(), v8::internal::CommandMessage::client_data(), command_queue_, command_received_, DCHECK, v8::internal::Logger::DebugTag(), v8::internal::CommandMessage::Dispose(), v8::Exception, v8::internal::Isolate::factory(), v8::internal::Object::GetProperty(), has_commands(), in_debug_scope(), InvokeMessageHandler(), is_active(), is_active_, isolate_, v8::internal::Vector< T >::length(), v8::internal::Isolate::logger(), v8::internal::MessageImpl::NewEvent(), v8::NewFunction, v8::internal::MessageImpl::NewResponse(), v8::internal::PrintF(), v8::internal::Isolate::stack_guard(), v8::internal::Vector< T >::start(), v8::internal::CommandMessage::text(), and UNREACHABLE.
Referenced by ProcessDebugEvent().
Definition at line 2621 of file debug.cc.
References v8::internal::ScriptCache::Add(), v8::AfterCompile, arraysize, DCHECK, debug_context(), DebugScope, v8::internal::Isolate::factory(), v8::internal::Object::GetProperty(), v8::internal::Script::GetWrapper(), ignore_events(), in_debug_scope(), isolate_, v8::internal::Isolate::js_builtins_object(), MakeCompileEvent(), NULL, ProcessDebugEvent(), script_cache_, and STATIC_CHAR_VECTOR.
Referenced by v8::internal::LiveEdit::ChangeScriptSource(), and v8::internal::CompileToplevel().
Definition at line 2690 of file debug.cc.
References v8::AsyncTaskEvent, DebugScope, ignore_events(), in_debug_scope(), isolate_, MakeAsyncTaskEvent(), and ProcessDebugEvent().
Definition at line 2600 of file debug.cc.
References v8::BeforeCompile, DebugScope, ignore_events(), in_debug_scope(), isolate_, MakeCompileEvent(), and ProcessDebugEvent().
Referenced by v8::internal::CompileToplevel().
Definition at line 2562 of file debug.cc.
References v8::CompileError, DebugScope, ignore_events(), in_debug_scope(), isolate_, MakeCompileEvent(), and ProcessDebugEvent().
Referenced by v8::internal::Parser::ThrowPendingError().
Definition at line 2580 of file debug.cc.
References AssertDebugContext(), v8::Break, ignore_events(), isolate_, MakeBreakEvent(), and ProcessDebugEvent().
Referenced by Break(), and ProcessDebugMessages().
|
private |
Definition at line 2528 of file debug.cc.
References break_on_exception_, break_on_uncaught_exception_, ClearStepping(), DebugScope, MakeExceptionEvent(), ProcessDebugEvent(), and PromiseHasRejectHandler().
Referenced by OnPromiseReject(), and OnThrow().
Definition at line 2671 of file debug.cc.
References DebugScope, ignore_events(), in_debug_scope(), isolate_, MakePromiseEvent(), ProcessDebugEvent(), and v8::PromiseEvent.
Definition at line 2521 of file debug.cc.
References ignore_events(), in_debug_scope(), isolate_, and OnException().
Definition at line 2504 of file debug.cc.
References v8::internal::Isolate::clear_scheduled_exception(), v8::internal::Isolate::GetPromiseOnStackOnThrow(), v8::internal::handle(), v8::internal::Isolate::has_scheduled_exception(), ignore_events(), in_debug_scope(), v8::internal::Handle< T >::is_null(), isolate_, OnException(), v8::internal::Isolate::scheduled_exception(), and v8::internal::Isolate::thread_local_top().
Referenced by v8::internal::Isolate::DoThrow().
void v8::internal::Debug::PrepareForBreakPoints | ( | ) |
Definition at line 1907 of file debug.cc.
References v8::internal::List< T, AllocationPolicy >::Add(), BUILTIN, v8::internal::Isolate::builtins(), v8::internal::JSFunction::code(), v8::internal::CollectActiveFunctionsFromThread(), v8::internal::Heap::CollectAllGarbage(), v8::internal::ComputeCodeOffsetFromPcOffset(), v8::internal::Isolate::concurrent_recompilation_enabled(), v8::internal::JSGeneratorObject::continuation(), DCHECK_EQ, DCHECK_LT, v8::internal::Deoptimizer::DeoptimizeAll(), v8::internal::EnsureFunctionHasDebugBreakSlots(), v8::internal::OptimizingCompilerThread::Flush(), v8::internal::Smi::FromInt(), has_break_points_, v8::internal::Code::has_debug_break_slots(), v8::internal::Isolate::heap(), v8::internal::JSGeneratorObject::is_suspended(), isolate_, v8::internal::ThreadManager::IterateArchivedThreads(), v8::internal::Code::kind(), v8::internal::Heap::kMakeHeapIterableMask, NULL, v8::internal::Isolate::optimizing_compiler_thread(), v8::internal::RecompileAndRelocateSuspendedGenerators(), v8::internal::RedirectActivationsToRecompiledCodeOnThread(), v8::internal::JSGeneratorObject::set_continuation(), v8::internal::Isolate::thread_local_top(), and v8::internal::Isolate::thread_manager().
Referenced by FloodWithOneShot(), IsBreakAtReturn(), PrepareStep(), SetAfterBreakTarget(), SetBreakPoint(), and SetBreakPointForScript().
void v8::internal::Debug::PrepareStep | ( | StepAction | step_action, |
int | step_count, | ||
StackFrame::Id | frame_id | ||
) |
Definition at line 1276 of file debug.cc.
References ActivateStepIn(), ActivateStepOut(), v8::internal::ALL_BREAK_LOCATIONS, break_frame_id(), v8::internal::Builtins::builtin(), v8::internal::Isolate::builtins(), v8::internal::StandardFrame::ComputeExpressionsCount(), DCHECK, EnsureDebugInfo(), v8::internal::CallICStub::ExtractArgcFromMinorKey(), v8::internal::CallFunctionStub::ExtractArgcFromMinorKey(), v8::internal::BreakLocationIterator::FindBreakLocationFromAddress(), FloodBoundFunctionWithOneShot(), FloodHandlerWithOneShot(), FloodWithOneShot(), v8::internal::JavaScriptFrame::function(), v8::internal::Code::GetCodeFromTargetAddress(), GetDebugInfo(), v8::internal::StandardFrame::GetExpression(), in_debug_scope(), v8::internal::Code::is_call_stub(), v8::internal::Code::is_inline_cache_stub(), v8::internal::Handle< T >::is_null(), v8::internal::RelocInfo::IsCodeTarget(), v8::internal::RelocInfo::IsConstructCall(), v8::internal::BreakLocationIterator::IsDebugBreak(), v8::internal::BreakLocationIterator::IsExit(), isolate_, v8::internal::Code::kind(), v8::internal::Debug::ThreadLocal::last_fp_, v8::internal::Debug::ThreadLocal::last_statement_position_, v8::internal::Debug::ThreadLocal::last_step_action_, NULL, v8::internal::BreakLocationIterator::original_rinfo(), PrepareForBreakPoints(), v8::internal::BreakLocationIterator::PrepareStepIn(), v8::internal::Debug::ThreadLocal::restarter_frame_function_pointer_, v8::internal::BreakLocationIterator::rinfo(), v8::internal::RelocInfo::rmode(), v8::internal::BreakLocationIterator::rmode(), v8::internal::Debug::ThreadLocal::step_count_, v8::internal::StepMin, v8::internal::StepNext, v8::internal::StepOut, v8::internal::STUB, and thread_local_.
Referenced by Break().
|
private |
Definition at line 2709 of file debug.cc.
References v8::Break, v8::BreakForCommand, CallEventCallback(), v8::internal::CommandMessage::client_data(), v8::internal::CommandMessage::Dispose(), event_command_queue_, event_listener_, isolate_, MakeExecutionState(), message_handler_, NotifyMessageHandler(), and NULL.
Referenced by OnAfterCompile(), OnAsyncTaskEvent(), OnBeforeCompile(), OnCompileError(), OnDebugBreak(), OnException(), and OnPromiseEvent().
void v8::internal::Debug::ProcessDebugMessages | ( | bool | debug_command_only | ) |
Definition at line 3057 of file debug.cc.
References DebugScope, v8::internal::Isolate::factory(), isolate_, OnDebugBreak(), and v8::internal::Isolate::stack_guard().
Referenced by HandleDebugBreak().
Definition at line 1265 of file debug.cc.
References v8::internal::Handle< T >::cast(), v8::internal::Isolate::factory(), v8::internal::JSObject::GetDataProperty(), isolate_, v8::internal::Isolate::js_builtins_object(), and NULL.
Referenced by OnException().
Definition at line 2419 of file debug.cc.
References v8::internal::Script::COMPILATION_TYPE_EVAL, v8::internal::Smi::FromInt(), and v8::internal::Code::instruction_start().
Referenced by v8::internal::Compiler::GetFunctionFromEval().
Definition at line 2208 of file debug.cc.
References DCHECK, v8::internal::DebugInfoListNode::debug_info(), debug_info_list_, has_break_points_, v8::internal::Isolate::heap(), isolate_, v8::internal::DebugInfoListNode::next(), NULL, v8::internal::DebugInfoListNode::set_next(), and UNREACHABLE.
Referenced by ClearAllBreakPoints(), ClearBreakPoint(), and HandleWeakDebugInfo().
|
inline |
Definition at line 485 of file debug.h.
References v8::internal::Debug::ThreadLocal::restarter_frame_function_pointer_, and thread_local_.
char * v8::internal::Debug::RestoreDebug | ( | char * | from | ) |
Definition at line 579 of file debug.cc.
References ArchiveSpacePerThread(), v8::internal::MemCopy(), and thread_local_.
Referenced by v8::internal::ThreadManager::RestoreThread().
|
inline |
|
inline |
Definition at line 460 of file debug.h.
References live_edit_enabled_.
Referenced by v8::Debug::SetLiveEditEnabled().
void v8::internal::Debug::SetAfterBreakTarget | ( | JavaScriptFrame * | frame | ) |
Definition at line 2239 of file debug.cc.
References after_break_target_, v8::internal::Assembler::break_address_from_return_address(), DCHECK, v8::internal::RelocIterator::done(), EnsureDebugInfo(), v8::internal::JavaScriptFrame::function(), GetDebugInfo(), IsDebugBreak(), v8::internal::RelocInfo::IsDebugBreakSlot(), v8::internal::RelocInfo::IsJSReturn(), isolate_, v8::internal::Assembler::kDebugBreakSlotLength, v8::internal::Assembler::kPatchDebugBreakSlotAddressOffset, v8::internal::Assembler::kPatchReturnSequenceAddressOffset, v8::internal::RelocIterator::next(), NULL, v8::internal::RelocInfo::pc(), PrepareForBreakPoints(), v8::internal::RelocIterator::rinfo(), v8::internal::RelocInfo::rmode(), v8::internal::LiveEdit::SetAfterBreakTarget(), v8::internal::Assembler::target_address_at(), and v8::internal::Assembler::target_address_from_return_address().
bool v8::internal::Debug::SetBreakPoint | ( | Handle< JSFunction > | function, |
Handle< Object > | break_point_object, | ||
int * | source_position | ||
) |
Definition at line 1075 of file debug.cc.
References DCHECK, EnsureDebugInfo(), v8::internal::BreakLocationIterator::FindBreakLocationFromPosition(), GetDebugInfo(), isolate_, v8::internal::BreakLocationIterator::position(), PrepareForBreakPoints(), v8::internal::BreakLocationIterator::SetBreakPoint(), v8::internal::SOURCE_BREAK_LOCATIONS, and v8::internal::STATEMENT_ALIGNED.
bool v8::internal::Debug::SetBreakPointForScript | ( | Handle< Script > | script, |
Handle< Object > | break_point_object, | ||
int * | source_position, | ||
BreakPositionAlignment | alignment | ||
) |
Definition at line 1105 of file debug.cc.
References DCHECK, EnsureDebugInfo(), v8::internal::BreakLocationIterator::FindBreakLocationFromPosition(), FindSharedFunctionInfoInScript(), GetDebugInfo(), isolate_, v8::internal::BreakLocationIterator::position(), PrepareForBreakPoints(), v8::internal::BreakLocationIterator::SetBreakPoint(), and v8::internal::SOURCE_BREAK_LOCATIONS.
Definition at line 2921 of file debug.cc.
References v8::internal::GlobalHandles::Create(), v8::internal::GlobalHandles::Destroy(), event_listener_, event_listener_data_, v8::internal::Isolate::factory(), v8::internal::Isolate::global_handles(), v8::internal::Handle< T >::is_null(), isolate_, and UpdateState().
Referenced by v8::Debug::SetDebugEventListener().
void v8::internal::Debug::SetMessageHandler | ( | v8::Debug::MessageHandler | handler | ) |
Definition at line 2942 of file debug.cc.
References EnqueueCommandMessage(), in_debug_scope(), message_handler_, NULL, and UpdateState().
Referenced by v8::Debug::SetMessageHandler().
|
inlineprivate |
Definition at line 499 of file debug.h.
References v8::internal::Debug::ThreadLocal::break_count_, v8::internal::Debug::ThreadLocal::break_id_, and thread_local_.
|
inline |
Definition at line 490 of file debug.h.
References v8::internal::Debug::ThreadLocal::step_into_fp_, and thread_local_.
|
inline |
Definition at line 402 of file debug.h.
References v8::internal::Debug::ThreadLocal::step_into_fp_, and thread_local_.
Referenced by ActivateStepOut(), v8::internal::Object::GetPropertyWithDefinedGetter(), v8::internal::Runtime_NewObjectHelper(), and v8::internal::Object::SetPropertyWithDefinedSetter().
bool v8::internal::Debug::StepNextContinue | ( | BreakLocationIterator * | break_location_iterator, |
JavaScriptFrame * | frame | ||
) |
Definition at line 1511 of file debug.cc.
References v8::internal::BreakLocationIterator::code(), v8::internal::BreakLocationIterator::IsExit(), v8::internal::Debug::ThreadLocal::last_fp_, v8::internal::Debug::ThreadLocal::last_statement_position_, v8::internal::Debug::ThreadLocal::last_step_action_, v8::internal::Code::SourceStatementPosition(), v8::internal::StepIn, v8::internal::StepNext, v8::internal::StepOut, and thread_local_.
Referenced by Break().
|
inline |
Definition at line 407 of file debug.h.
References v8::internal::Debug::ThreadLocal::step_out_fp_, and thread_local_.
Referenced by ActivateStepIn(), and Break().
|
private |
Definition at line 554 of file debug.cc.
References v8::internal::Debug::ThreadLocal::break_count_, v8::internal::Debug::ThreadLocal::break_frame_id_, v8::internal::Debug::ThreadLocal::break_id_, v8::internal::Debug::ThreadLocal::current_debug_scope_, v8::internal::RelocInfo::kNoPosition, v8::internal::Debug::ThreadLocal::last_fp_, v8::internal::Debug::ThreadLocal::last_statement_position_, v8::internal::Debug::ThreadLocal::last_step_action_, NULL, v8::internal::Debug::ThreadLocal::queued_step_count_, v8::internal::Debug::ThreadLocal::restarter_frame_function_pointer_, v8::internal::Debug::ThreadLocal::step_count_, v8::internal::Debug::ThreadLocal::step_into_fp_, v8::internal::Debug::ThreadLocal::step_out_fp_, v8::internal::StepNone, and thread_local_.
Referenced by ArchiveDebug(), and Debug().
|
private |
Definition at line 847 of file debug.cc.
References ClearAllBreakPoints(), ClearStepping(), debug_context_, v8::internal::GlobalHandles::Destroy(), is_loaded(), NULL, and script_cache_.
Referenced by v8::internal::Isolate::Deinit(), and UpdateState().
|
private |
Definition at line 2954 of file debug.cc.
References v8::internal::Isolate::compilation_cache(), v8::internal::CompilationCache::Disable(), v8::internal::CompilationCache::Enable(), event_listener_, in_debug_scope(), is_active_, is_loaded(), isolate_, Load(), message_handler_, NULL, and Unload().
Referenced by SetEventListener(), and SetMessageHandler().
|
friend |
|
friend |
Definition at line 647 of file debug.h.
Referenced by Break(), Call(), GetDebugContext(), OnAfterCompile(), OnAsyncTaskEvent(), OnBeforeCompile(), OnCompileError(), OnException(), OnPromiseEvent(), and ProcessDebugMessages().
|
friend |
|
private |
Definition at line 592 of file debug.h.
Referenced by after_break_target_address(), v8::internal::LiveEdit::SetAfterBreakTarget(), and SetAfterBreakTarget().
|
private |
Definition at line 582 of file debug.h.
Referenced by Break(), HandleDebugBreak(), and set_disable_break().
|
private |
Definition at line 583 of file debug.h.
Referenced by ChangeBreakOnException(), IsBreakOnException(), and OnException().
|
private |
Definition at line 584 of file debug.h.
Referenced by ChangeBreakOnException(), IsBreakOnException(), and OnException().
|
private |
Definition at line 575 of file debug.h.
Referenced by EnqueueCommandMessage(), has_commands(), and NotifyMessageHandler().
|
private |
Definition at line 574 of file debug.h.
Referenced by EnqueueCommandMessage(), and NotifyMessageHandler().
Definition at line 567 of file debug.h.
Referenced by debug_context(), is_loaded(), Load(), and Unload().
|
private |
Definition at line 587 of file debug.h.
Referenced by ClearAllBreakPoints(), ClearBreakPoint(), ClearOneShot(), EnsureDebugInfo(), HandleWeakDebugInfo(), and RemoveDebugInfo().
|
private |
Definition at line 576 of file debug.h.
Referenced by EnqueueDebugCommand(), and ProcessDebugEvent().
Definition at line 568 of file debug.h.
Referenced by CallEventCallback(), ProcessDebugEvent(), SetEventListener(), and UpdateState().
Definition at line 569 of file debug.h.
Referenced by CallEventCallback(), and SetEventListener().
|
private |
Definition at line 581 of file debug.h.
Referenced by EnsureDebugInfo(), FindSharedFunctionInfoInScript(), has_break_points(), IsBreakAtReturn(), PrepareForBreakPoints(), and RemoveDebugInfo().
|
private |
Definition at line 578 of file debug.h.
Referenced by ignore_events(), is_active(), is_active_address(), NotifyMessageHandler(), and UpdateState().
|
private |
Definition at line 579 of file debug.h.
Referenced by ignore_events(), and Load().
|
private |
Definition at line 644 of file debug.h.
Referenced by AssertDebugContext(), Break(), Call(), CallEventCallback(), CheckBreakPoint(), CheckBreakPoints(), ClearBreakPoint(), ClearMirrorCache(), EnqueueCommandMessage(), EnqueueDebugCommand(), FindSharedFunctionInfoInScript(), FloodBoundFunctionWithOneShot(), FloodHandlerWithOneShot(), GetDebugContext(), GetLoadedScripts(), HandleDebugBreak(), IsBreakAtReturn(), Load(), MakeBreakEvent(), MakeCompileEvent(), MakeExceptionEvent(), MakeExecutionState(), MakeJSObject(), NotifyMessageHandler(), OnAfterCompile(), OnAsyncTaskEvent(), OnBeforeCompile(), OnCompileError(), OnDebugBreak(), OnPromiseEvent(), OnPromiseReject(), OnThrow(), PrepareForBreakPoints(), PrepareStep(), ProcessDebugEvent(), ProcessDebugMessages(), PromiseHasRejectHandler(), RemoveDebugInfo(), v8::internal::LiveEdit::SetAfterBreakTarget(), SetAfterBreakTarget(), SetBreakPoint(), SetBreakPointForScript(), SetEventListener(), and UpdateState().
|
staticprivate |
|
private |
Definition at line 580 of file debug.h.
Referenced by live_edit_enabled(), and set_live_edit_enabled().
|
private |
Definition at line 571 of file debug.h.
Referenced by InvokeMessageHandler(), ProcessDebugEvent(), SetMessageHandler(), and UpdateState().
|
private |
Definition at line 586 of file debug.h.
Referenced by GetLoadedScripts(), OnAfterCompile(), and Unload().
|
private |
Definition at line 642 of file debug.h.
Referenced by ActivateStepIn(), ActivateStepOut(), ArchiveDebug(), Break(), break_frame_id(), break_id(), ClearStepIn(), ClearStepNext(), ClearStepOut(), ClearStepping(), debugger_entry(), FramesHaveBeenDropped(), HandleStepIn(), in_debug_scope(), v8::internal::LiveEdit::InitializeThreadLocal(), IsStepping(), PrepareStep(), restarter_frame_function_pointer_address(), RestoreDebug(), v8::internal::LiveEdit::SetAfterBreakTarget(), SetNextBreakId(), step_in_fp_addr(), StepInActive(), StepNextContinue(), StepOutActive(), and ThreadInit().