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

Unified Diff: src/objects.h

Issue 2230143002: [debugger] use source position to identify break points. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comment Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/debug.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index bf6ad3d4d7a3ee08a516a967f1687031530975e9..3c3bfe3093d40699dcebbcec9b45a630bb7e6268 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -10866,19 +10866,17 @@ class DebugInfo: public Struct {
// Fixed array holding status information for each active break point.
DECL_ACCESSORS(break_points, FixedArray)
- // Check if there is a break point at a code offset.
- bool HasBreakPoint(int code_offset);
- // Get the break point info object for a code offset.
- Object* GetBreakPointInfo(int code_offset);
+ // Check if there is a break point at a source position.
+ bool HasBreakPoint(int source_position);
// Clear a break point.
- static void ClearBreakPoint(Handle<DebugInfo> debug_info, int code_offset,
+ static void ClearBreakPoint(Handle<DebugInfo> debug_info, int source_position,
Handle<Object> break_point_object);
// Set a break point.
- static void SetBreakPoint(Handle<DebugInfo> debug_info, int code_offset,
- int source_position, int statement_position,
+ static void SetBreakPoint(Handle<DebugInfo> debug_info, int source_position,
+ int statement_position,
Handle<Object> break_point_object);
- // Get the break point objects for a code offset.
- Handle<Object> GetBreakPointObjects(int code_offset);
+ // Get the break point objects for a source position.
+ Handle<Object> GetBreakPointObjects(int source_position);
// Find the break point info holding this break point object.
static Handle<Object> FindBreakPointInfo(Handle<DebugInfo> debug_info,
Handle<Object> break_point_object);
@@ -10903,10 +10901,8 @@ class DebugInfo: public Struct {
static const int kEstimatedNofBreakPointsInFunction = 16;
private:
- static const int kNoBreakPointInfo = -1;
-
- // Lookup the index in the break_points array for a code offset.
- int GetBreakPointInfoIndex(int code_offset);
+ // Get the break point info object for a source position.
+ Object* GetBreakPointInfo(int source_position);
DISALLOW_IMPLICIT_CONSTRUCTORS(DebugInfo);
};
@@ -10917,13 +10913,8 @@ class DebugInfo: public Struct {
// position with one or more break points.
class BreakPointInfo: public Struct {
public:
- // The code offset for the break point.
- DECL_INT_ACCESSORS(code_offset)
// The position in the source for the break position.
DECL_INT_ACCESSORS(source_position)
- // The position in the source for the last statement before this break
- // position.
- DECL_INT_ACCESSORS(statement_position)
// List of related JavaScript break points.
DECL_ACCESSORS(break_point_objects, Object)
@@ -10945,12 +10936,9 @@ class BreakPointInfo: public Struct {
DECLARE_PRINTER(BreakPointInfo)
DECLARE_VERIFIER(BreakPointInfo)
- static const int kCodeOffsetIndex = Struct::kHeaderSize;
- static const int kSourcePositionIndex = kCodeOffsetIndex + kPointerSize;
- static const int kStatementPositionIndex =
- kSourcePositionIndex + kPointerSize;
+ static const int kSourcePositionIndex = Struct::kHeaderSize;
static const int kBreakPointObjectsIndex =
- kStatementPositionIndex + kPointerSize;
+ kSourcePositionIndex + kPointerSize;
static const int kSize = kBreakPointObjectsIndex + kPointerSize;
private:
« no previous file with comments | « src/debug/debug.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698