| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 static void PrepareStep(StepAction step_action, int step_count); | 231 static void PrepareStep(StepAction step_action, int step_count); |
| 232 static void ClearStepping(); | 232 static void ClearStepping(); |
| 233 static bool StepNextContinue(BreakLocationIterator* break_location_iterator, | 233 static bool StepNextContinue(BreakLocationIterator* break_location_iterator, |
| 234 JavaScriptFrame* frame); | 234 JavaScriptFrame* frame); |
| 235 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); | 235 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); |
| 236 static bool HasDebugInfo(Handle<SharedFunctionInfo> shared); | 236 static bool HasDebugInfo(Handle<SharedFunctionInfo> shared); |
| 237 | 237 |
| 238 // Returns whether the operation succeeded. | 238 // Returns whether the operation succeeded. |
| 239 static bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared); | 239 static bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared); |
| 240 | 240 |
| 241 // Returns true if the current stub call is patched to call the debugger. |
| 241 static bool IsDebugBreak(Address addr); | 242 static bool IsDebugBreak(Address addr); |
| 243 // Returns true if the current return statement has been patched to be |
| 244 // a debugger breakpoint. |
| 242 static bool IsDebugBreakAtReturn(RelocInfo* rinfo); | 245 static bool IsDebugBreakAtReturn(RelocInfo* rinfo); |
| 243 | 246 |
| 244 // Check whether a code stub with the specified major key is a possible break | 247 // Check whether a code stub with the specified major key is a possible break |
| 245 // point location. | 248 // point location. |
| 246 static bool IsSourceBreakStub(Code* code); | 249 static bool IsSourceBreakStub(Code* code); |
| 247 static bool IsBreakStub(Code* code); | 250 static bool IsBreakStub(Code* code); |
| 248 | 251 |
| 249 // Find the builtin to use for invoking the debug break | 252 // Find the builtin to use for invoking the debug break |
| 250 static Handle<Code> FindDebugBreak(Handle<Code> code, RelocInfo::Mode mode); | 253 static Handle<Code> FindDebugBreak(Handle<Code> code, RelocInfo::Mode mode); |
| 251 | 254 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 362 |
| 360 // Garbage collection notifications. | 363 // Garbage collection notifications. |
| 361 static void AfterGarbageCollection(); | 364 static void AfterGarbageCollection(); |
| 362 | 365 |
| 363 // Code generation assumptions. | 366 // Code generation assumptions. |
| 364 static const int kIa32CallInstructionLength = 5; | 367 static const int kIa32CallInstructionLength = 5; |
| 365 static const int kIa32JSReturnSequenceLength = 6; | 368 static const int kIa32JSReturnSequenceLength = 6; |
| 366 | 369 |
| 367 // The x64 JS return sequence is padded with int3 to make it large | 370 // The x64 JS return sequence is padded with int3 to make it large |
| 368 // enough to hold a call instruction when the debugger patches it. | 371 // enough to hold a call instruction when the debugger patches it. |
| 372 static const int kX64CallInstructionLength = 13; |
| 369 static const int kX64JSReturnSequenceLength = 13; | 373 static const int kX64JSReturnSequenceLength = 13; |
| 370 | 374 |
| 371 // Code generator routines. | 375 // Code generator routines. |
| 372 static void GenerateLoadICDebugBreak(MacroAssembler* masm); | 376 static void GenerateLoadICDebugBreak(MacroAssembler* masm); |
| 373 static void GenerateStoreICDebugBreak(MacroAssembler* masm); | 377 static void GenerateStoreICDebugBreak(MacroAssembler* masm); |
| 374 static void GenerateKeyedLoadICDebugBreak(MacroAssembler* masm); | 378 static void GenerateKeyedLoadICDebugBreak(MacroAssembler* masm); |
| 375 static void GenerateKeyedStoreICDebugBreak(MacroAssembler* masm); | 379 static void GenerateKeyedStoreICDebugBreak(MacroAssembler* masm); |
| 376 static void GenerateConstructCallDebugBreak(MacroAssembler* masm); | 380 static void GenerateConstructCallDebugBreak(MacroAssembler* masm); |
| 377 static void GenerateReturnDebugBreak(MacroAssembler* masm); | 381 static void GenerateReturnDebugBreak(MacroAssembler* masm); |
| 378 static void GenerateReturnDebugBreakEntry(MacroAssembler* masm); | 382 static void GenerateReturnDebugBreakEntry(MacroAssembler* masm); |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 Debug::AddressId id_; | 850 Debug::AddressId id_; |
| 847 int reg_; | 851 int reg_; |
| 848 }; | 852 }; |
| 849 | 853 |
| 850 | 854 |
| 851 } } // namespace v8::internal | 855 } } // namespace v8::internal |
| 852 | 856 |
| 853 #endif // ENABLE_DEBUGGER_SUPPORT | 857 #endif // ENABLE_DEBUGGER_SUPPORT |
| 854 | 858 |
| 855 #endif // V8_DEBUG_H_ | 859 #endif // V8_DEBUG_H_ |
| OLD | NEW |