OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_DEBUG_H_ | 5 #ifndef V8_DEBUG_H_ |
6 #define V8_DEBUG_H_ | 6 #define V8_DEBUG_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 357 |
358 // This class contains the debugger support. The main purpose is to handle | 358 // This class contains the debugger support. The main purpose is to handle |
359 // setting break points in the code. | 359 // setting break points in the code. |
360 // | 360 // |
361 // This class controls the debug info for all functions which currently have | 361 // This class controls the debug info for all functions which currently have |
362 // active breakpoints in them. This debug info is held in the heap root object | 362 // active breakpoints in them. This debug info is held in the heap root object |
363 // debug_info which is a FixedArray. Each entry in this list is of class | 363 // debug_info which is a FixedArray. Each entry in this list is of class |
364 // DebugInfo. | 364 // DebugInfo. |
365 class Debug { | 365 class Debug { |
366 public: | 366 public: |
367 enum AfterCompileFlags { | |
368 NO_AFTER_COMPILE_FLAGS, | |
369 SEND_WHEN_DEBUGGING | |
370 }; | |
371 | |
372 // Debug event triggers. | 367 // Debug event triggers. |
373 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); | 368 void OnDebugBreak(Handle<Object> break_points_hit, bool auto_continue); |
374 void OnException(Handle<Object> exception, bool uncaught); | 369 void OnException(Handle<Object> exception, bool uncaught); |
375 void OnBeforeCompile(Handle<Script> script); | 370 void OnBeforeCompile(Handle<Script> script); |
376 void OnAfterCompile(Handle<Script> script, | 371 void OnAfterCompile(Handle<Script> script); |
377 AfterCompileFlags after_compile_flags); | |
378 void OnScriptCollected(int id); | 372 void OnScriptCollected(int id); |
379 | 373 |
380 // API facing. | 374 // API facing. |
381 void SetEventListener(Handle<Object> callback, Handle<Object> data); | 375 void SetEventListener(Handle<Object> callback, Handle<Object> data); |
382 void SetMessageHandler(v8::Debug::MessageHandler handler); | 376 void SetMessageHandler(v8::Debug::MessageHandler handler); |
383 void EnqueueCommandMessage(Vector<const uint16_t> command, | 377 void EnqueueCommandMessage(Vector<const uint16_t> command, |
384 v8::Debug::ClientData* client_data = NULL); | 378 v8::Debug::ClientData* client_data = NULL); |
385 // Enqueue a debugger command to the command queue for event listeners. | 379 // Enqueue a debugger command to the command queue for event listeners. |
386 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); | 380 void EnqueueDebugCommand(v8::Debug::ClientData* client_data = NULL); |
387 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, | 381 MUST_USE_RESULT MaybeHandle<Object> Call(Handle<JSFunction> fun, |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 // several frames above. | 763 // several frames above. |
770 // There is no calling conventions here, because it never actually gets | 764 // There is no calling conventions here, because it never actually gets |
771 // called, it only gets returned to. | 765 // called, it only gets returned to. |
772 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); | 766 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); |
773 }; | 767 }; |
774 | 768 |
775 | 769 |
776 } } // namespace v8::internal | 770 } } // namespace v8::internal |
777 | 771 |
778 #endif // V8_DEBUG_H_ | 772 #endif // V8_DEBUG_H_ |
OLD | NEW |