Home | History | Annotate | Download | only in src

Lines Matching defs:Debug

14 #include "src/debug.h"
28 #include "include/v8-debug.h"
33 Debug::Debug(Isolate* isolate)
56 Handle<Context> context = isolate->debug()->debugger_entry()->GetContext();
127 // There is always a possible break point at a debug break slot.
273 // If there is not already a real break point here patch code with debug
287 // If there are no more break points here remove the debug break.
305 // Patch code with debug break.
320 // Patch code removing debug break.
385 #ifdef DEBUG
405 // because caller of this function (Debug::PrepareStep) is expected to
408 // this function (Debug::PrepareStep) which should flood target function
428 // Check whether there is a debug break at the current position.
435 return Debug::IsDebugBreak(rinfo()->target_address());
440 // Find the builtin to use for invoking the debug break
444 // Find the builtin debug break function matching the calling convention
497 // Patch the code to invoke the builtin debug break function matching the
526 // Clear out all the debug break code. This is ONLY supposed to be used when
546 #ifdef DEBUG
556 void Debug::ThreadInit() {
574 char* Debug::ArchiveDebug(char* storage) {
582 char* Debug::RestoreDebug(char* storage) {
589 int Debug::ArchiveSpacePerThread() {
655 Debug* debug = isolate_->debug();
657 debug->OnScriptCollected(collected_scripts_[i]);
698 void Debug::HandleWeakDebugInfo(
700 Debug* debug = reinterpret_cast<Isolate*>(data.GetIsolate())->debug();
706 // Debug::FindSharedFunctionInfoInScript.
709 debug->RemoveDebugInfo(node->debug_info());
710 #ifdef DEBUG
711 for (DebugInfoListNode* n = debug->debug_info_list_;
721 // Globalize the request debug info object and make it weak.
726 Debug::HandleWeakDebugInfo);
735 bool Debug::CompileDebuggerScript(Isolate* isolate, int index) {
802 bool Debug::Load() {
847 !CompileDebuggerScript(isolate_, Natives::GetIndex("debug"));
862 void Debug::Unload() {
884 void Debug::Break(Arguments args, JavaScriptFrame* frame) {
902 // Get the debug info (create it if it does not exist).
956 // Notify the debug event listeners.
1000 isolate->debug()->Break(args, it.frame());
1001 isolate->debug()->SetAfterBreakTarget(it.frame());
1009 Handle<Object> Debug::CheckBreakPoints(Handle<Object> break_point_objects) {
1045 bool Debug::CheckBreakPoint(Handle<Object> break_point_object) {
1052 // Get the function IsBreakPointTriggered (defined in debug-debugger.js).
1062 Handle<Object> break_id = factory->NewNumberFromInt(Debug::break_id());
1079 // Check whether the function has debug information.
1080 bool Debug::HasDebugInfo(Handle<SharedFunctionInfo> shared) {
1085 // Return the debug info for this function. EnsureDebugInfo must be called
1086 // prior to ensure the debug info has been generated for shared.
1087 Handle<DebugInfo> Debug::GetDebugInfo(Handle<SharedFunctionInfo> shared) {
1093 bool Debug::SetBreakPoint(Handle<JSFunction> function,
1100 // Make sure the function is compiled and has set up the debug info.
1103 // Return if retrieving debug info failed.
1123 bool Debug::SetBreakPointForScript(Handle<Script> script,
1135 // Make sure the function has set up the debug info.
1138 // Return if retrieving debug info failed.
1168 void Debug::ClearBreakPoint(Handle<Object> break_point_object) {
1186 // If there are no more break points left remove the debug info for this
1199 void Debug::ClearAllBreakPoints() {
1202 // Remove all debug break code.
1208 // Remove all debug info.
1215 void Debug::FloodWithOneShot(Handle<JSFunction> function) {
1218 // Make sure the function is compiled and has set up the debug info.
1221 // Return if we failed to retrieve the debug info.
1234 void Debug::FloodBoundFunctionWithOneShot(Handle<JSFunction> function) {
1242 Debug::FloodWithOneShot(bindee_function);
1247 void Debug::FloodHandlerWithOneShot() {
1265 void Debug::ChangeBreakOnException(ExceptionBreakType type, bool enable) {
1274 bool Debug::IsBreakOnException(ExceptionBreakType type) {
1299 void Debug::PromiseHandlePrologue(Handle<JSFunction> promise_getter) {
1306 void Debug::PromiseHandleEpilogue() {
1314 Handle<Object> Debug::GetPromiseForUncaughtException() {
1325 #ifdef DEBUG
1333 #endif // DEBUG
1343 void Debug::PrepareStep(StepAction step_action,
1362 // Get the frame where the execution has stopped and skip the debug frame if
1363 // any. The debug frame will only be present if execution was stopped due to
1365 // debug frame is not present.
1394 // Get the debug info (create it if it does not exist).
1398 // Return if ensuring debug info failed.
1547 Debug::FloodBoundFunctionWithOneShot(js_function);
1566 // propagated on the next Debug::Break.
1579 // Check whether the current debug break should be reported to the debugger. It
1585 bool Debug::StepNextContinue(BreakLocationIterator* break_location_iterator,
1613 // Check whether the code object at the specified address is a debug break code
1615 bool Debug::IsDebugBreak(Address addr) {
1625 Handle<Object> Debug::GetSourceBreakLocations(
1667 void Debug::HandleStepIn(Handle<JSFunction> function,
1689 Debug::FloodBoundFunctionWithOneShot(function);
1703 Debug::FloodWithOneShot(js_function);
1706 Debug::FloodBoundFunctionWithOneShot(js_function);
1710 Debug::FloodWithOneShot(function);
1717 void Debug::ClearStepping() {
1732 void Debug::ClearOneShot() {
1749 void Debug::ActivateStepIn(StackFrame* frame) {
1755 void Debug::ClearStepIn() {
1760 void Debug::ActivateStepOut(StackFrame* frame) {
1766 void Debug::ClearStepOut() {
1771 void Debug::ClearStepNext() {
1909 // debug break slots.
1946 // Nothing to do. Function code already had debug break slots.
1949 // Make sure that the shared full code is compiled with debug
1956 // Simply use shared code if it has debug break slots.
1976 void Debug::PrepareForBreakPoints() {
2012 // debug break slots.
2034 // debug break slots and are not active or inlined into an active
2140 Object* Debug::FindSharedFunctionInfoInScript(Handle<Script> script,
2245 // Ensures the debug information is present for shared.
2246 bool Debug::EnsureDebugInfo(Handle<SharedFunctionInfo> shared,
2250 // Return if we already have the debug info for shared.
2265 // Create the debug info object.
2268 // Add debug info to the list.
2277 void Debug::RemoveDebugInfo(Handle<DebugInfo> debug_info) {
2279 // Run through the debug info objects to find this one and remove it.
2294 // If there are no more debug info objects there are not more break
2308 void Debug::SetAfterBreakTarget(JavaScriptFrame* frame) {
2316 // Get the executing function in which the debug break occurred.
2320 // Return if we failed to retrieve the debug info.
2326 #ifdef DEBUG
2333 // either a DebugBreakXXX or to the debug break return entry code if the
2337 // Check if the location is at JS exit or debug break slot.
2368 // Address of where the debug break slot starts.
2374 // We now know that there is still a debug break call at the target address,
2395 bool Debug::IsBreakAtReturn(JavaScriptFrame* frame) {
2407 // Get the executing function in which the debug break occurred.
2411 // Return if we failed to retrieve the debug info.
2416 #ifdef DEBUG
2438 void Debug::FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
2450 bool Debug::IsDebugGlobal(GlobalObject* global) {
2455 void Debug::ClearMirrorCache() {
2473 Handle<FixedArray> Debug::GetLoadedScripts() {
2481 "Debug::GetLoadedScripts");
2488 void Debug::RecordEvalCaller(Handle<Script> script) {
2503 void Debug::AfterGarbageCollection() {
2511 MaybeHandle<Object> Debug::MakeJSObject(const char* constructor_name,
2529 MaybeHandle<Object> Debug::MakeExecutionState() {
2536 MaybeHandle<Object> Debug::MakeBreakEvent(Handle<Object> break_points_hit) {
2545 MaybeHandle<Object> Debug::MakeExceptionEvent(Handle<Object> exception,
2559 MaybeHandle<Object> Debug::MakeCompileEvent(Handle<Script> script,
2572 MaybeHandle<Object> Debug::MakeScriptCollectedEvent(int id) {
2582 void Debug::OnException(Handle<Object> exception, bool uncaught) {
2612 // Process debug event.
2618 void Debug::OnDebugBreak(Handle<Object> break_points_hit,
2631 // Process debug event.
2638 void Debug::OnBeforeCompile(Handle<Script> script) {
2650 // Process debug event.
2658 void Debug::OnAfterCompile(Handle<Script> script,
2676 // Get the function UpdateScriptBreakPoints (defined in debug-debugger.js).
2709 // Process debug event.
2714 void Debug::OnScriptCollected(int id) {
2726 // Process debug event.
2733 void Debug::ProcessDebugEvent(v8::DebugEvent event,
2750 // Notify registered debug event listener. This can be either a C or
2752 // here, if it's only a debug command -- they will be processed later.
2756 // Process pending debug commands.
2772 void Debug::CallEventCallback(v8::DebugEvent event,
2775 v8::Debug::ClientData* client_data) {
2777 // Invoke the C debug event listener.
2778 v8::Debug::EventCallback callback =
2779 FUNCTION_CAST<v8::Debug::EventCallback>(
2789 // Invoke the JavaScript debug event listener.
2803 Handle<Context> Debug::GetDebugContext() {
2810 void Debug::NotifyMessageHandler(v8::DebugEvent event,
2843 // The debug command interrupt flag might have been set when the command was
2849 // Notify the debugger that a debug event has occurred unless auto continue is
2937 // Return from debug event processing if either the VM is put into the
2944 void Debug::SetEventListener(Handle<Object> callback,
2965 void Debug::SetMessageHandler(v8::Debug::MessageHandler handler) {
2977 void Debug::UpdateState() {
2980 // Note that the debug context could have already been loaded to
2991 // Calls the registered debug message handler. This callback is part of the
2993 void Debug::InvokeMessageHandler(MessageImpl message) {
3002 void Debug::EnqueueCommandMessage(Vector<const uint16_t> command,
3003 v8::Debug::ClientData* client_data) {
3013 // Set the debug command break flag to have the command processed.
3018 void Debug::EnqueueDebugCommand(v8::Debug::ClientData* client_data) {
3022 // Set the debug command break flag to have the command processed.
3027 MaybeHandle<Object> Debug::Call(Handle<JSFunction> fun, Handle<Object> data) {
3047 void Debug::HandleDebugBreak() {
3048 // Ignore debug break during bootstrapping.
3052 // Ignore debug break if debugger is not active.
3080 void Debug::ProcessDebugMessages(bool debug_command_only) {
3090 // Notify the debug event listeners. Indicate auto continue if the break was
3091 // a debug command break.
3096 DebugScope::DebugScope(Debug* debug) : debug_(debug),
3097 prev_(debug->debugger_entry()),
3118 if (!failed_) isolate()->set_context(*debug->debug_context());
3127 // JavaScript. This can happen if the v8::Debug::Call is used in which
3162 v8::Debug::ClientData* client_data) {
3175 v8::Debug::ClientData* client_data)
3225 // Call toJSONProtocol on the debug event object.
3254 v8::Debug::ClientData* MessageImpl::GetClientData() const {
3263 v8::Debug::ClientData* client_data)
3296 v8::Debug::ClientData* EventDetailsImpl::GetClientData() const {
3307 v8::Debug::ClientData* data)
3321 v8::Debug::ClientData* data) {