File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ package struct GDBHostCommand: Equatable {
4949 case removeSoftwareBreakpoint
5050 case wasmLocal
5151 case memoryRegionInfo
52+ case detach
5253
5354 case generalRegisters
5455
@@ -103,6 +104,8 @@ package struct GDBHostCommand: Equatable {
103104 self = . wasmLocal
104105 case " qMemoryRegionInfo " :
105106 self = . memoryRegionInfo
107+ case " D " :
108+ self = . detach
106109
107110 default :
108111 return nil
Original file line number Diff line number Diff line change 4444 /// Threading model of the Wasm engine configuration, cached for a potentially hot path.
4545 private let threadingModel : EngineConfiguration . ThreadingModel
4646
47- private( set) var breakpoints = [ Int: CodeSlot] ( )
47+ /// Mapping from a Wasm address of a breakpoint to a corresponding iseq code slot.
48+ package private( set) var breakpoints = [ Int: UInt64] ( )
4849
4950 package private( set) var state : State
5051
Original file line number Diff line number Diff line change 281281 case . kill:
282282 throw Error . killRequestReceived
283283
284+ case . detach:
285+ for address in self . debugger. breakpoints. keys {
286+ try self . debugger. disableBreakpoint ( address: address)
287+ }
288+
289+ try self . debugger. run ( )
290+ throw Error . killRequestReceived
291+
284292 case . insertSoftwareBreakpoint:
285293 try self . debugger. enableBreakpoint (
286294 address: Int (
You can’t perform that action at this time.
0 commit comments