Skip to content

Commit 85b2248

Browse files
committed
Fix build errors
1 parent 3a2eb99 commit 85b2248

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Sources/WasmKit/Execution/Debugger.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
let frameIndex: UInt32
247247
let localIndex: UInt32
248248

249-
package init(frameIndex: Int, localIndex: Int) {
249+
package init(frameIndex: UInt32, localIndex: UInt32) {
250250
self.frameIndex = frameIndex
251251
self.localIndex = localIndex
252252
}

Sources/WasmKitGDBHandler/WasmKitGDBHandler.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,12 @@
244244
else { throw Error.unknownReadMemoryArguments }
245245

246246
if address > localOffset {
247-
let localRaw = address - localOffset
248-
let localAddress = Debugger.LocalAddress(frameIndex:)
247+
let localAddress = Debugger.LocalAddress(raw: address)
248+
fatalError()
249249
} else if address > stackOffset {
250250
fatalError("Stack reads are not implemented in the debugger yet")
251251
} else if address > codeOffset {
252-
let binaryOffset = address - stackOffset
252+
let binaryOffset = Int(address - stackOffset)
253253
if binaryOffset + length > wasmBinary.readableBytes {
254254
length = wasmBinary.readableBytes - binaryOffset
255255
}
@@ -332,7 +332,7 @@
332332
response.writeInteger(frameIndex, endianness: .little)
333333
response.writeInteger(localIndex, endianness: .little)
334334

335-
responseKind = .hexEncodedBinary(response)
335+
responseKind = .hexEncodedBinary(response.readableBytesView)
336336

337337
case .generalRegisters:
338338
throw Error.hostCommandNotImplemented(command.kind)

0 commit comments

Comments
 (0)