OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 static int break_id() { return thread_local_.break_id_; } | 275 static int break_id() { return thread_local_.break_id_; } |
276 | 276 |
277 static bool StepInActive() { return thread_local_.step_into_fp_ != 0; } | 277 static bool StepInActive() { return thread_local_.step_into_fp_ != 0; } |
278 static void HandleStepIn(Handle<JSFunction> function, | 278 static void HandleStepIn(Handle<JSFunction> function, |
279 Handle<Object> holder, | 279 Handle<Object> holder, |
280 Address fp, | 280 Address fp, |
281 bool is_constructor); | 281 bool is_constructor); |
282 static Address step_in_fp() { return thread_local_.step_into_fp_; } | 282 static Address step_in_fp() { return thread_local_.step_into_fp_; } |
283 static Address* step_in_fp_addr() { return &thread_local_.step_into_fp_; } | 283 static Address* step_in_fp_addr() { return &thread_local_.step_into_fp_; } |
284 | 284 |
| 285 static bool StepOutActive() { return thread_local_.step_out_fp_ != 0; } |
| 286 static Address step_out_fp() { return thread_local_.step_out_fp_; } |
| 287 |
285 static EnterDebugger* debugger_entry() { | 288 static EnterDebugger* debugger_entry() { |
286 return thread_local_.debugger_entry_; | 289 return thread_local_.debugger_entry_; |
287 } | 290 } |
288 static void set_debugger_entry(EnterDebugger* entry) { | 291 static void set_debugger_entry(EnterDebugger* entry) { |
289 thread_local_.debugger_entry_ = entry; | 292 thread_local_.debugger_entry_ = entry; |
290 } | 293 } |
291 | 294 |
292 // Check whether any of the specified interrupts are pending. | 295 // Check whether any of the specified interrupts are pending. |
293 static bool is_interrupt_pending(InterruptFlag what) { | 296 static bool is_interrupt_pending(InterruptFlag what) { |
294 return (thread_local_.pending_interrupts_ & what) != 0; | 297 return (thread_local_.pending_interrupts_ & what) != 0; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 static void GenerateStubNoRegistersDebugBreak(MacroAssembler* masm); | 389 static void GenerateStubNoRegistersDebugBreak(MacroAssembler* masm); |
387 | 390 |
388 // Called from stub-cache.cc. | 391 // Called from stub-cache.cc. |
389 static void GenerateCallICDebugBreak(MacroAssembler* masm); | 392 static void GenerateCallICDebugBreak(MacroAssembler* masm); |
390 | 393 |
391 private: | 394 private: |
392 static bool CompileDebuggerScript(int index); | 395 static bool CompileDebuggerScript(int index); |
393 static void ClearOneShot(); | 396 static void ClearOneShot(); |
394 static void ActivateStepIn(StackFrame* frame); | 397 static void ActivateStepIn(StackFrame* frame); |
395 static void ClearStepIn(); | 398 static void ClearStepIn(); |
| 399 static void ActivateStepOut(StackFrame* frame); |
| 400 static void ClearStepOut(); |
396 static void ClearStepNext(); | 401 static void ClearStepNext(); |
397 // Returns whether the compile succeeded. | 402 // Returns whether the compile succeeded. |
398 static bool EnsureCompiled(Handle<SharedFunctionInfo> shared); | 403 static bool EnsureCompiled(Handle<SharedFunctionInfo> shared); |
399 static void RemoveDebugInfo(Handle<DebugInfo> debug_info); | 404 static void RemoveDebugInfo(Handle<DebugInfo> debug_info); |
400 static void SetAfterBreakTarget(JavaScriptFrame* frame); | 405 static void SetAfterBreakTarget(JavaScriptFrame* frame); |
401 static Handle<Object> CheckBreakPoints(Handle<Object> break_point); | 406 static Handle<Object> CheckBreakPoints(Handle<Object> break_point); |
402 static bool CheckBreakPoint(Handle<Object> break_point_object); | 407 static bool CheckBreakPoint(Handle<Object> break_point_object); |
403 | 408 |
404 // Global handle to debug context where all the debugger JavaScript code is | 409 // Global handle to debug context where all the debugger JavaScript code is |
405 // loaded. | 410 // loaded. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 | 443 |
439 // Number of steps left to perform before debug event. | 444 // Number of steps left to perform before debug event. |
440 int step_count_; | 445 int step_count_; |
441 | 446 |
442 // Frame pointer from last step next action. | 447 // Frame pointer from last step next action. |
443 Address last_fp_; | 448 Address last_fp_; |
444 | 449 |
445 // Frame pointer for frame from which step in was performed. | 450 // Frame pointer for frame from which step in was performed. |
446 Address step_into_fp_; | 451 Address step_into_fp_; |
447 | 452 |
| 453 // Frame pointer for the frame where debugger should be called when current |
| 454 // step out action is completed. |
| 455 Address step_out_fp_; |
| 456 |
448 // Storage location for jump when exiting debug break calls. | 457 // Storage location for jump when exiting debug break calls. |
449 Address after_break_target_; | 458 Address after_break_target_; |
450 | 459 |
451 // Top debugger entry. | 460 // Top debugger entry. |
452 EnterDebugger* debugger_entry_; | 461 EnterDebugger* debugger_entry_; |
453 | 462 |
454 // Pending interrupts scheduled while debugging. | 463 // Pending interrupts scheduled while debugging. |
455 int pending_interrupts_; | 464 int pending_interrupts_; |
456 }; | 465 }; |
457 | 466 |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 Debug::AddressId id_; | 862 Debug::AddressId id_; |
854 int reg_; | 863 int reg_; |
855 }; | 864 }; |
856 | 865 |
857 | 866 |
858 } } // namespace v8::internal | 867 } } // namespace v8::internal |
859 | 868 |
860 #endif // ENABLE_DEBUGGER_SUPPORT | 869 #endif // ENABLE_DEBUGGER_SUPPORT |
861 | 870 |
862 #endif // V8_DEBUG_H_ | 871 #endif // V8_DEBUG_H_ |
OLD | NEW |