Skip to content

Commit b846ea7

Browse files
committed
Use KeyValuePairs response for .registerInfo
1 parent b1e69ac commit b846ea7

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Sources/WasmKitGDBHandler/WasmKitDebugger.swift

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,21 @@ package actor WasmKitDebugger {
6969
])
7070

7171
case .registerInfo:
72-
.raw("name:pc;alt-name:pc;bitsize:64;offset:0;encoding:uint;format:hex;set:General Purpose Registers;gcc:16;dwarf:16;generic:pc;")
72+
if command.arguments == "0" {
73+
.keyValuePairs([
74+
"name": "pc",
75+
"bitsize": "64",
76+
"offset": "0",
77+
"encoding": "uint",
78+
"format": "hex",
79+
"set": "General Purpose Registers",
80+
"gcc": "16",
81+
"dwarf": "16",
82+
"generic": "pc"
83+
])
84+
} else {
85+
.raw("E45")
86+
}
7387

7488
case .generalRegisters:
7589
fatalError()

0 commit comments

Comments
 (0)