302 bool IsEmpty()
const {
return start_ == end_; }
380 int* source_position);
383 int* source_position,
396 StackFrame::Id frame_id);
406 bool is_constructor);
442 Object** restarter_frame_function_pointer);
487 return reinterpret_cast<Address>(address);
512 const char* constructor_name,
693 : debug_(debug), old_state_(debug->break_disabled_) {
694 debug_->break_disabled_ = disable_break;
708 : debug_(debug), old_state_(debug->is_suppressed_) {
709 debug_->is_suppressed_ =
true;
A client object passed to the v8 debugger whose ownership will be taken by it.
An event details object passed to the debug event listener.
A message object passed to the debug message handler.
void(* MessageHandler)(const Message &message)
Debug message callback function.
An object reference managed by the v8 garbage collector.
Isolate represents an isolated instance of the V8 engine.
A single JavaScript stack frame.
DisableBreak(Debug *debug, bool disable_break)
StackFrame::Id break_frame_id_
CommandMessage * messages_
Handle< Context > GetContext()
DISALLOW_COPY_AND_ASSIGN(DisableBreak)
CommandMessageQueue queue_
void Put(const CommandMessage &message)
DISALLOW_COPY_AND_ASSIGN(SuppressDebug)
LockingCommandMessageQueue(Logger *logger, int size)
DISALLOW_COPY_AND_ASSIGN(LockingCommandMessageQueue)
SuppressDebug(Debug *debug)
CommandMessageQueue(int size)
PostponeInterruptsScope no_termination_exceptons_
Handle< DebugInfo > debug_info_
bool IsDebugBreakAtSlot()
void ClearBreakPoint(Handle< Object > break_point_object)
void FindBreakLocationFromAddress(Address pc)
void SetDebugBreakAtSlot()
DISALLOW_COPY_AND_ASSIGN(BreakLocationIterator)
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()
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 void GenerateSlot(MacroAssembler *masm)
static void GenerateStoreICDebugBreak(MacroAssembler *masm)
static void GenerateLoadICDebugBreak(MacroAssembler *masm)
static void GeneratePlainReturnLiveEdit(MacroAssembler *masm)
static void GenerateCallConstructStubDebugBreak(MacroAssembler *masm)
static void GenerateCallConstructStubRecordDebugBreak(MacroAssembler *masm)
static void GenerateCallFunctionStubDebugBreak(MacroAssembler *masm)
static void GenerateCompareNilICDebugBreak(MacroAssembler *masm)
static void GenerateKeyedStoreICDebugBreak(MacroAssembler *masm)
static void GenerateCallICStubDebugBreak(MacroAssembler *masm)
static void GenerateFrameDropperLiveEdit(MacroAssembler *masm)
static void GenerateKeyedLoadICDebugBreak(MacroAssembler *masm)
static void GenerateReturnDebugBreak(MacroAssembler *masm)
static void GenerateSlotDebugBreak(MacroAssembler *masm)
Handle< DebugInfo > debug_info_
DebugInfoListNode * next_
virtual ~DebugInfoListNode()
void set_next(DebugInfoListNode *next)
DebugInfoListNode * next()
Handle< DebugInfo > debug_info()
DebugInfoListNode(DebugInfo *debug_info)
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()
static const int kQueueInitialSize
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_
friend Handle< FixedArray > GetDebuggedFunctions()
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)
Address step_in_fp_addr()
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)
static bool IsDebugBreakAtReturn(RelocInfo *rinfo)
bool has_break_points() const
Address is_active_address()
void ChangeBreakOnException(ExceptionBreakType type, bool enable)
v8::Debug::MessageHandler message_handler_
Object * FindSharedFunctionInfoInScript(Handle< Script > script, int position)
void FreeThreadResources()
bool live_edit_enabled() const
friend void CheckDebuggerUnloaded(bool check_functions)
Address restarter_frame_function_pointer_address()
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)
Address after_break_target_address()
void FloodHandlerWithOneShot()
void OnPromiseEvent(Handle< JSObject > data)
void set_live_edit_enabled(bool v)
MUST_USE_RESULT MaybeHandle< Object > MakeCompileEvent(Handle< Script > script, v8::DebugEvent type)
DebugInfoListNode * debug_info_list_
static bool CompileDebuggerScript(Isolate *isolate, int index)
DISALLOW_COPY_AND_ASSIGN(Debug)
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)
void set_disable_break(bool v)
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_
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.
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)
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 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 DCHECK(condition)
DECLARE_RUNTIME_FUNCTION(Debug_Break)
static const uint32_t kZeroHashSeed
uint32_t ComputeIntegerHash(uint32_t key, uint32_t seed)
Debugger support for the V8 JavaScript engine.