1// Copyright 2019 the V8 project authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5@generateCppClass 6@generatePrint 7extern class BreakPoint extends Struct { 8 id: Smi; 9 condition: String; 10} 11 12@generateCppClass 13@generatePrint 14extern class BreakPointInfo extends Struct { 15 // The position in the source for the break position. 16 source_position: Smi; 17 // List of related JavaScript break points. 18 break_points: FixedArray|BreakPoint|Undefined; 19} 20 21bitfield struct DebugInfoFlags extends uint31 { 22 has_break_info: bool: 1 bit; 23 prepared_for_debug_execution: bool: 1 bit; 24 has_coverage_info: bool: 1 bit; 25 break_at_entry: bool: 1 bit; 26 can_break_at_entry: bool: 1 bit; 27 debug_execution_mode: bool: 1 bit; 28} 29 30bitfield struct DebuggerHints extends uint31 { 31 side_effect_state: int32: 2 bit; 32 debug_is_blackboxed: bool: 1 bit; 33 computed_debug_is_blackboxed: bool: 1 bit; 34 debugging_id: int32: 20 bit; 35} 36 37@generateCppClass 38@generatePrint 39extern class DebugInfo extends Struct { 40 shared: SharedFunctionInfo; 41 // Bit field containing various information collected for debugging. 42 debugger_hints: SmiTagged<DebuggerHints>; 43 // Script field from shared function info. 44 script: Undefined|Script; 45 // The original uninstrumented bytecode array for functions with break 46 // points - the instrumented bytecode is held in the shared function info. 47 original_bytecode_array: Undefined|BytecodeArray; 48 // The debug instrumented bytecode array for functions with break points 49 // - also pointed to by the shared function info. 50 debug_bytecode_array: Undefined|BytecodeArray; 51 // Fixed array holding status information for each active break point. 52 break_points: FixedArray; 53 // A bitfield that lists uses of the current instance. 54 flags: SmiTagged<DebugInfoFlags>; 55 coverage_info: CoverageInfo|Undefined; 56} 57 58@export 59struct CoverageInfoSlot { 60 start_source_position: int32; 61 end_source_position: int32; 62 block_count: int32; 63 padding: int32; // Padding to make the index count 4. 64} 65 66// CoverageInfo's visitor is included in DATA_ONLY_VISITOR_ID_LIST, so it must 67// not contain any HeapObject fields. 68@generateCppClass 69extern class CoverageInfo extends HeapObject { 70 const slot_count: int32; 71 slots[slot_count]: CoverageInfoSlot; 72} 73 74@generateCppClass 75@generatePrint 76extern class WasmValue extends Struct { 77 // TODO(7748): Name and comment are outdated. 78 // The type, should map to ValueType::Kind values in value-type.h. 79 value_type: SmiTagged<WasmValueType>; 80 // Holds the actual value. For example, if this holds a Wasm i32, this will 81 // be of length 4, for s128, it will have length 16. These values are 82 // represented by the respective C++ types, and memcpy-ed in. 83 // When value_type is a externref, it holds the object that externref points 84 // to. 85 bytes_or_ref: Object|ByteArray; 86} 87