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

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

Issue 1610073002: [debugger] negative conditional break points mute breaks and exceptions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 4 years, 11 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 | « no previous file | 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/arguments.h" 9 #include "src/arguments.h"
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 BREAK_POSITION_ALIGNED = 1 59 BREAK_POSITION_ALIGNED = 1
60 }; 60 };
61 61
62 62
63 class BreakLocation { 63 class BreakLocation {
64 public: 64 public:
65 // Find the break point at the supplied address, or the closest one before 65 // Find the break point at the supplied address, or the closest one before
66 // the address. 66 // the address.
67 static BreakLocation FromAddress(Handle<DebugInfo> debug_info, Address pc); 67 static BreakLocation FromAddress(Handle<DebugInfo> debug_info, Address pc);
68 68
69 template <class Frame>
70 static BreakLocation FromFrame(Handle<DebugInfo> debug_info, Frame* frame) {
71 // PC points to the instruction after the current one, possibly a break
72 // location as well. So the "- 1" to exclude it from the search.
73 return FromAddress(debug_info, frame->pc() - 1);
74 }
75
69 static void FromAddressSameStatement(Handle<DebugInfo> debug_info, Address pc, 76 static void FromAddressSameStatement(Handle<DebugInfo> debug_info, Address pc,
70 List<BreakLocation>* result_out); 77 List<BreakLocation>* result_out);
71 78
72 static BreakLocation FromPosition(Handle<DebugInfo> debug_info, int position, 79 static BreakLocation FromPosition(Handle<DebugInfo> debug_info, int position,
73 BreakPositionAlignment alignment); 80 BreakPositionAlignment alignment);
74 81
75 bool IsDebugBreak() const; 82 bool IsDebugBreak() const;
76 83
77 inline bool IsReturn() const { 84 inline bool IsReturn() const {
78 return RelocInfo::IsDebugBreakSlotAtReturn(rmode_); 85 return RelocInfo::IsDebugBreakSlotAtReturn(rmode_);
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 bool auto_continue); 554 bool auto_continue);
548 void NotifyMessageHandler(v8::DebugEvent event, 555 void NotifyMessageHandler(v8::DebugEvent event,
549 Handle<JSObject> exec_state, 556 Handle<JSObject> exec_state,
550 Handle<JSObject> event_data, 557 Handle<JSObject> event_data,
551 bool auto_continue); 558 bool auto_continue);
552 void InvokeMessageHandler(MessageImpl message); 559 void InvokeMessageHandler(MessageImpl message);
553 560
554 void ClearOneShot(); 561 void ClearOneShot();
555 void ActivateStepOut(StackFrame* frame); 562 void ActivateStepOut(StackFrame* frame);
556 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info); 563 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info);
557 Handle<Object> CheckBreakPoints(Handle<Object> break_point); 564 Handle<Object> CheckBreakPoints(BreakLocation* location,
565 bool* has_break_points = nullptr);
566 bool IsMutedAtCurrentLocation(JavaScriptFrame* frame);
558 bool CheckBreakPoint(Handle<Object> break_point_object); 567 bool CheckBreakPoint(Handle<Object> break_point_object);
559 MaybeHandle<Object> CallFunction(const char* name, int argc, 568 MaybeHandle<Object> CallFunction(const char* name, int argc,
560 Handle<Object> args[]); 569 Handle<Object> args[]);
561 570
562 inline void AssertDebugContext() { 571 inline void AssertDebugContext() {
563 DCHECK(isolate_->context() == *debug_context()); 572 DCHECK(isolate_->context() == *debug_context());
564 DCHECK(in_debug_scope()); 573 DCHECK(in_debug_scope());
565 } 574 }
566 575
567 void ThreadInit(); 576 void ThreadInit();
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 static void PatchDebugBreakSlot(Isolate* isolate, Address pc, 748 static void PatchDebugBreakSlot(Isolate* isolate, Address pc,
740 Handle<Code> code); 749 Handle<Code> code);
741 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); 750 static void ClearDebugBreakSlot(Isolate* isolate, Address pc);
742 }; 751 };
743 752
744 753
745 } // namespace internal 754 } // namespace internal
746 } // namespace v8 755 } // namespace v8
747 756
748 #endif // V8_DEBUG_DEBUG_H_ 757 #endif // V8_DEBUG_DEBUG_H_
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698