Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(920)

Side by Side Diff: src/debug/debug.h

Issue 2909893002: [debug] Untangle DebugInfo from break point support (Closed)
Patch Set: Address comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_DEBUG_DEBUG_H_ 5 #ifndef V8_DEBUG_DEBUG_H_
6 #define V8_DEBUG_DEBUG_H_ 6 #define V8_DEBUG_DEBUG_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/base/atomicops.h" 10 #include "src/base/atomicops.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 void RunPromiseHook(PromiseHookType type, Handle<JSPromise> promise, 325 void RunPromiseHook(PromiseHookType type, Handle<JSPromise> promise,
326 Handle<Object> parent); 326 Handle<Object> parent);
327 327
328 int NextAsyncTaskId(Handle<JSObject> promise); 328 int NextAsyncTaskId(Handle<JSObject> promise);
329 329
330 bool IsBlackboxed(Handle<SharedFunctionInfo> shared); 330 bool IsBlackboxed(Handle<SharedFunctionInfo> shared);
331 331
332 void SetDebugDelegate(debug::DebugDelegate* delegate, bool pass_ownership); 332 void SetDebugDelegate(debug::DebugDelegate* delegate, bool pass_ownership);
333 333
334 // Returns whether the operation succeeded. 334 // Returns whether the operation succeeded.
335 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared); 335 bool EnsureBreakInfo(Handle<SharedFunctionInfo> shared);
336 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); 336 void CreateBreakInfo(Handle<SharedFunctionInfo> shared);
337 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); 337 Handle<DebugInfo> GetOrCreateDebugInfo(Handle<SharedFunctionInfo> shared);
338 338
339 template <typename C> 339 template <typename C>
340 bool CompileToRevealInnerFunctions(C* compilable); 340 bool CompileToRevealInnerFunctions(C* compilable);
341 341
342 // This function is used in FunctionNameUsing* tests. 342 // This function is used in FunctionNameUsing* tests.
343 Handle<Object> FindSharedFunctionInfoInScript(Handle<Script> script, 343 Handle<Object> FindSharedFunctionInfoInScript(Handle<Script> script,
344 int position); 344 int position);
345 345
346 static Handle<Object> GetSourceBreakLocations( 346 static Handle<Object> GetSourceBreakLocations(
347 Handle<SharedFunctionInfo> shared, 347 Handle<SharedFunctionInfo> shared,
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 void ClearAllBreakPoints(); 489 void ClearAllBreakPoints();
490 // Instrument a function with one-shots. 490 // Instrument a function with one-shots.
491 void FloodWithOneShot(Handle<SharedFunctionInfo> function, 491 void FloodWithOneShot(Handle<SharedFunctionInfo> function,
492 bool returns_only = false); 492 bool returns_only = false);
493 // Clear all one-shot instrumentations, but restore break points. 493 // Clear all one-shot instrumentations, but restore break points.
494 void ClearOneShot(); 494 void ClearOneShot();
495 495
496 bool IsFrameBlackboxed(JavaScriptFrame* frame); 496 bool IsFrameBlackboxed(JavaScriptFrame* frame);
497 497
498 void ActivateStepOut(StackFrame* frame); 498 void ActivateStepOut(StackFrame* frame);
499 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info);
500 MaybeHandle<FixedArray> CheckBreakPoints(Handle<DebugInfo> debug_info, 499 MaybeHandle<FixedArray> CheckBreakPoints(Handle<DebugInfo> debug_info,
501 BreakLocation* location, 500 BreakLocation* location,
502 bool* has_break_points = nullptr); 501 bool* has_break_points = nullptr);
503 bool IsMutedAtCurrentLocation(JavaScriptFrame* frame); 502 bool IsMutedAtCurrentLocation(JavaScriptFrame* frame);
504 bool CheckBreakPoint(Handle<Object> break_point_object); 503 bool CheckBreakPoint(Handle<Object> break_point_object);
505 MaybeHandle<Object> CallFunction(const char* name, int argc, 504 MaybeHandle<Object> CallFunction(const char* name, int argc,
506 Handle<Object> args[]); 505 Handle<Object> args[]);
507 506
508 inline void AssertDebugContext() { 507 inline void AssertDebugContext() {
509 DCHECK(isolate_->context() == *debug_context()); 508 DCHECK(isolate_->context() == *debug_context());
510 DCHECK(in_debug_scope()); 509 DCHECK(in_debug_scope());
511 } 510 }
512 511
513 void ThreadInit(); 512 void ThreadInit();
514 513
515 void PrintBreakLocation(); 514 void PrintBreakLocation();
516 515
516 void RemoveBreakInfoAndMaybeFree(Handle<DebugInfo> debug_info);
517 void FindDebugInfo(Handle<DebugInfo> debug_info, DebugInfoListNode** prev,
518 DebugInfoListNode** curr);
519 void FreeDebugInfoListNode(DebugInfoListNode* prev, DebugInfoListNode* node);
520
517 // Global handles. 521 // Global handles.
518 Handle<Context> debug_context_; 522 Handle<Context> debug_context_;
519 523
520 debug::DebugDelegate* debug_delegate_ = nullptr; 524 debug::DebugDelegate* debug_delegate_ = nullptr;
521 bool owns_debug_delegate_ = false; 525 bool owns_debug_delegate_ = false;
522 526
523 // Debugger is active, i.e. there is a debug event listener attached. 527 // Debugger is active, i.e. there is a debug event listener attached.
524 bool is_active_; 528 bool is_active_;
525 // Debugger needs to be notified on every new function call. 529 // Debugger needs to be notified on every new function call.
526 // Used for stepping and read-only checks 530 // Used for stepping and read-only checks
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 Handle<Code> code); 808 Handle<Code> code);
805 static bool DebugBreakSlotIsPatched(Address pc); 809 static bool DebugBreakSlotIsPatched(Address pc);
806 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); 810 static void ClearDebugBreakSlot(Isolate* isolate, Address pc);
807 }; 811 };
808 812
809 813
810 } // namespace internal 814 } // namespace internal
811 } // namespace v8 815 } // namespace v8
812 816
813 #endif // V8_DEBUG_DEBUG_H_ 817 #endif // V8_DEBUG_DEBUG_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698