| 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 // Leaving this debugger entry. | 680 // Leaving this debugger entry. |
| 681 Debug::set_debugger_entry(prev_); | 681 Debug::set_debugger_entry(prev_); |
| 682 } | 682 } |
| 683 | 683 |
| 684 // Check whether the debugger could be entered. | 684 // Check whether the debugger could be entered. |
| 685 inline bool FailedToEnter() { return load_failed_; } | 685 inline bool FailedToEnter() { return load_failed_; } |
| 686 | 686 |
| 687 // Check whether there are any JavaScript frames on the stack. | 687 // Check whether there are any JavaScript frames on the stack. |
| 688 inline bool HasJavaScriptFrames() { return has_js_frames_; } | 688 inline bool HasJavaScriptFrames() { return has_js_frames_; } |
| 689 | 689 |
| 690 // Get the active context from before entering the debugger. |
| 691 inline Handle<Context> GetContext() { return save_.context(); } |
| 692 |
| 690 private: | 693 private: |
| 691 EnterDebugger* prev_; // Previous debugger entry if entered recursively. | 694 EnterDebugger* prev_; // Previous debugger entry if entered recursively. |
| 692 JavaScriptFrameIterator it_; | 695 JavaScriptFrameIterator it_; |
| 693 const bool has_js_frames_; // Were there any JavaScript frames? | 696 const bool has_js_frames_; // Were there any JavaScript frames? |
| 694 StackFrame::Id break_frame_id_; // Previous break frame id. | 697 StackFrame::Id break_frame_id_; // Previous break frame id. |
| 695 int break_id_; // Previous break id. | 698 int break_id_; // Previous break id. |
| 696 bool load_failed_; // Did the debugger fail to load? | 699 bool load_failed_; // Did the debugger fail to load? |
| 697 SaveContext save_; // Saves previous context. | 700 SaveContext save_; // Saves previous context. |
| 698 }; | 701 }; |
| 699 | 702 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 Debug::AddressId id_; | 759 Debug::AddressId id_; |
| 757 int reg_; | 760 int reg_; |
| 758 }; | 761 }; |
| 759 | 762 |
| 760 | 763 |
| 761 } } // namespace v8::internal | 764 } } // namespace v8::internal |
| 762 | 765 |
| 763 #endif // ENABLE_DEBUGGER_SUPPORT | 766 #endif // ENABLE_DEBUGGER_SUPPORT |
| 764 | 767 |
| 765 #endif // V8_DEBUG_H_ | 768 #endif // V8_DEBUG_H_ |
| OLD | NEW |