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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 static void GenerateConstructCallDebugBreak(MacroAssembler* masm); | 393 static void GenerateConstructCallDebugBreak(MacroAssembler* masm); |
394 static void GenerateReturnDebugBreak(MacroAssembler* masm); | 394 static void GenerateReturnDebugBreak(MacroAssembler* masm); |
395 static void GenerateStubNoRegistersDebugBreak(MacroAssembler* masm); | 395 static void GenerateStubNoRegistersDebugBreak(MacroAssembler* masm); |
396 static void GenerateSlotDebugBreak(MacroAssembler* masm); | 396 static void GenerateSlotDebugBreak(MacroAssembler* masm); |
397 static void GeneratePlainReturnLiveEdit(MacroAssembler* masm); | 397 static void GeneratePlainReturnLiveEdit(MacroAssembler* masm); |
398 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); | 398 static void GenerateFrameDropperLiveEdit(MacroAssembler* masm); |
399 | 399 |
400 // Called from stub-cache.cc. | 400 // Called from stub-cache.cc. |
401 static void GenerateCallICDebugBreak(MacroAssembler* masm); | 401 static void GenerateCallICDebugBreak(MacroAssembler* masm); |
402 | 402 |
403 static void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id); | 403 // Describes how exactly a frame has been dropped from stack. |
| 404 enum FrameDropMode { |
| 405 // No frame has been dropped. |
| 406 FRAMES_UNTOUCHED, |
| 407 // The top JS frame had been calling IC stub. IC stub mustn't be called now. |
| 408 FRAME_DROPPED_IN_IC_CALL, |
| 409 // The top JS frame had been calling debug break slot stub. Patch the |
| 410 // address this stub jumps to in the end. |
| 411 FRAME_DROPPED_IN_DEBUG_SLOT_CALL, |
| 412 // The top JS frame had been calling some C++ function. The return address |
| 413 // gets patched automatically. |
| 414 FRAME_DROPPED_IN_DIRECT_CALL |
| 415 }; |
| 416 |
| 417 static void FramesHaveBeenDropped(StackFrame::Id new_break_frame_id, |
| 418 FrameDropMode mode); |
404 | 419 |
405 static void SetUpFrameDropperFrame(StackFrame* bottom_js_frame, | 420 static void SetUpFrameDropperFrame(StackFrame* bottom_js_frame, |
406 Handle<Code> code); | 421 Handle<Code> code); |
407 static const int kFrameDropperFrameSize; | 422 static const int kFrameDropperFrameSize; |
408 | 423 |
409 private: | 424 private: |
410 static bool CompileDebuggerScript(int index); | 425 static bool CompileDebuggerScript(int index); |
411 static void ClearOneShot(); | 426 static void ClearOneShot(); |
412 static void ActivateStepIn(StackFrame* frame); | 427 static void ActivateStepIn(StackFrame* frame); |
413 static void ClearStepIn(); | 428 static void ClearStepIn(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 // Frame pointer for frame from which step in was performed. | 479 // Frame pointer for frame from which step in was performed. |
465 Address step_into_fp_; | 480 Address step_into_fp_; |
466 | 481 |
467 // Frame pointer for the frame where debugger should be called when current | 482 // Frame pointer for the frame where debugger should be called when current |
468 // step out action is completed. | 483 // step out action is completed. |
469 Address step_out_fp_; | 484 Address step_out_fp_; |
470 | 485 |
471 // Storage location for jump when exiting debug break calls. | 486 // Storage location for jump when exiting debug break calls. |
472 Address after_break_target_; | 487 Address after_break_target_; |
473 | 488 |
474 // Indicates that LiveEdit has patched the stack. | 489 // Stores the way how LiveEdit has patched the stack. It is used when |
475 bool frames_are_dropped_; | 490 // debugger returns control back to user script. |
| 491 FrameDropMode frame_drop_mode_; |
476 | 492 |
477 // Top debugger entry. | 493 // Top debugger entry. |
478 EnterDebugger* debugger_entry_; | 494 EnterDebugger* debugger_entry_; |
479 | 495 |
480 // Pending interrupts scheduled while debugging. | 496 // Pending interrupts scheduled while debugging. |
481 int pending_interrupts_; | 497 int pending_interrupts_; |
482 }; | 498 }; |
483 | 499 |
484 // Storage location for registers when handling debug break calls | 500 // Storage location for registers when handling debug break calls |
485 static JSCallerSavedBuffer registers_; | 501 static JSCallerSavedBuffer registers_; |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 | 965 |
950 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 966 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
951 }; | 967 }; |
952 | 968 |
953 | 969 |
954 } } // namespace v8::internal | 970 } } // namespace v8::internal |
955 | 971 |
956 #endif // ENABLE_DEBUGGER_SUPPORT | 972 #endif // ENABLE_DEBUGGER_SUPPORT |
957 | 973 |
958 #endif // V8_DEBUG_H_ | 974 #endif // V8_DEBUG_H_ |
OLD | NEW |