OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 221 matching lines...) Loading... |
232 void PreemptionWhileInDebugger(); | 232 void PreemptionWhileInDebugger(); |
233 void Iterate(ObjectVisitor* v); | 233 void Iterate(ObjectVisitor* v); |
234 | 234 |
235 NO_INLINE(void PutValuesOnStackAndDie(int start, | 235 NO_INLINE(void PutValuesOnStackAndDie(int start, |
236 Address c_entry_fp, | 236 Address c_entry_fp, |
237 Address last_fp, | 237 Address last_fp, |
238 Address larger_fp, | 238 Address larger_fp, |
239 int count, | 239 int count, |
240 int end)); | 240 int end)); |
241 Object* Break(Arguments args); | 241 Object* Break(Arguments args); |
242 void SetBreakPoint(Handle<SharedFunctionInfo> shared, | 242 void SetBreakPoint(Handle<JSFunction> function, |
243 Handle<Object> break_point_object, | 243 Handle<Object> break_point_object, |
244 int* source_position); | 244 int* source_position); |
| 245 bool SetBreakPointForScript(Handle<Script> script, |
| 246 Handle<Object> break_point_object, |
| 247 int* source_position); |
245 void ClearBreakPoint(Handle<Object> break_point_object); | 248 void ClearBreakPoint(Handle<Object> break_point_object); |
246 void ClearAllBreakPoints(); | 249 void ClearAllBreakPoints(); |
247 void FloodWithOneShot(Handle<SharedFunctionInfo> shared); | 250 void FloodWithOneShot(Handle<JSFunction> function); |
248 void FloodBoundFunctionWithOneShot(Handle<JSFunction> function); | 251 void FloodBoundFunctionWithOneShot(Handle<JSFunction> function); |
249 void FloodHandlerWithOneShot(); | 252 void FloodHandlerWithOneShot(); |
250 void ChangeBreakOnException(ExceptionBreakType type, bool enable); | 253 void ChangeBreakOnException(ExceptionBreakType type, bool enable); |
251 bool IsBreakOnException(ExceptionBreakType type); | 254 bool IsBreakOnException(ExceptionBreakType type); |
252 void PrepareStep(StepAction step_action, int step_count); | 255 void PrepareStep(StepAction step_action, int step_count); |
253 void ClearStepping(); | 256 void ClearStepping(); |
254 void ClearStepOut(); | 257 void ClearStepOut(); |
255 bool IsStepping() { return thread_local_.step_count_ > 0; } | 258 bool IsStepping() { return thread_local_.step_count_ > 0; } |
256 bool StepNextContinue(BreakLocationIterator* break_location_iterator, | 259 bool StepNextContinue(BreakLocationIterator* break_location_iterator, |
257 JavaScriptFrame* frame); | 260 JavaScriptFrame* frame); |
258 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); | 261 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); |
259 static bool HasDebugInfo(Handle<SharedFunctionInfo> shared); | 262 static bool HasDebugInfo(Handle<SharedFunctionInfo> shared); |
260 | 263 |
261 void PrepareForBreakPoints(); | 264 void PrepareForBreakPoints(); |
262 | 265 |
263 // Returns whether the operation succeeded. | 266 // Returns whether the operation succeeded. Compilation can only be triggered |
264 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared); | 267 // if a valid closure is passed as the second argument, otherwise the shared |
| 268 // function needs to be compiled already. |
| 269 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, |
| 270 Handle<JSFunction> function); |
265 | 271 |
266 // Returns true if the current stub call is patched to call the debugger. | 272 // Returns true if the current stub call is patched to call the debugger. |
267 static bool IsDebugBreak(Address addr); | 273 static bool IsDebugBreak(Address addr); |
268 // Returns true if the current return statement has been patched to be | 274 // Returns true if the current return statement has been patched to be |
269 // a debugger breakpoint. | 275 // a debugger breakpoint. |
270 static bool IsDebugBreakAtReturn(RelocInfo* rinfo); | 276 static bool IsDebugBreakAtReturn(RelocInfo* rinfo); |
271 | 277 |
272 // Check whether a code stub with the specified major key is a possible break | 278 // Check whether a code stub with the specified major key is a possible break |
273 // point location. | 279 // point location. |
274 static bool IsSourceBreakStub(Code* code); | 280 static bool IsSourceBreakStub(Code* code); |
(...skipping 760 matching lines...) Loading... |
1035 | 1041 |
1036 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 1042 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
1037 }; | 1043 }; |
1038 | 1044 |
1039 | 1045 |
1040 } } // namespace v8::internal | 1046 } } // namespace v8::internal |
1041 | 1047 |
1042 #endif // ENABLE_DEBUGGER_SUPPORT | 1048 #endif // ENABLE_DEBUGGER_SUPPORT |
1043 | 1049 |
1044 #endif // V8_DEBUG_H_ | 1050 #endif // V8_DEBUG_H_ |
OLD | NEW |