File tree Expand file tree Collapse file tree 4 files changed +13
-8
lines changed
source/Plugins/Process/wasm Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -2000,16 +2000,19 @@ correctly.
20002000
20012001## qWasmCallStack
20022002
2003- Get the Wasm callback for the given thread id. This returns a hex-encoding list
2004- of 64-bit addresses for the frame PCs. To match the Wasm specification, the
2005- addresses are encoded in little endian byte order.
2003+ Get the Wasm call stack for the given thread id. This returns a hex-encoded
2004+ list of PC values, one for each frame of the call stack. To match the Wasm
2005+ specification, the addresses are encoded in little endian byte order, even if
2006+ the endian of the Wasm runtime's host is not little endian.
20062007
20072008```
20082009send packet: $qWasmCallStack:202dbe040#08
20092010read packet: $9c01000000000040e501000000000040fe01000000000040#
20102011```
20112012
2012- **Priority to Implement:** Only required for WebAssembly support.
2013+ **Priority to Implement:** Only required for Wasm support. This packed is
2014+ supported by the [WAMR](https://github.com/bytecodealliance/wasm-micro-runtime)
2015+ and [V8](https://v8.dev) Wasm runtimes.
20132016
20142017## qWatchpointSupportInfo
20152018
Original file line number Diff line number Diff line change @@ -24,8 +24,10 @@ LLDB_PLUGIN_DEFINE(ProcessWasm)
2424
2525ProcessWasm::ProcessWasm(lldb::TargetSP target_sp, ListenerSP listener_sp)
2626 : ProcessGDBRemote(target_sp, listener_sp) {
27- // Always use Linux signals for Wasm process.
28- m_unix_signals_sp = UnixSignals::Create (ArchSpec{" wasm32-unknown-wasi-wasm" });
27+ assert (target_sp);
28+ // Wasm doesn't have any Unix-like signals as a platform concept, but pretend
29+ // like it does to appease LLDB.
30+ m_unix_signals_sp = UnixSignals::Create (target_sp->GetArchitecture ());
2931}
3032
3133void ProcessWasm::Initialize () {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ namespace wasm {
1717// / Each WebAssembly module has separated address spaces for Code and Memory.
1818// / A WebAssembly module also has a Data section which, when the module is
1919// / loaded, gets mapped into a region in the module Memory.
20- enum WasmAddressType { Memory = 0x00 , Object = 0x01 , Invalid = 0x03 };
20+ enum WasmAddressType : uint8_t { Memory = 0x00 , Object = 0x01 , Invalid = 0xff };
2121
2222// / For the purpose of debugging, we can represent all these separated 32-bit
2323// / address spaces with a single virtual 64-bit address space. The
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class WasmGDBRemoteRegisterContext : public GDBRemoteRegisterContext {
2828 false ) {
2929 // Wasm does not have a fixed set of registers but relies on a mechanism
3030 // named local and global variables to store information such as the stack
31- // pointer.
31+ // pointer. The only actual register is the PC.
3232 PrivateSetRegisterValue (0 , pc);
3333 }
3434};
You can’t perform that action at this time.
0 commit comments