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.
2000
2000
2001
2001
## qWasmCallStack
2002
2002
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.
2006
2007
2007
2008
```
2008
2009
send packet: $qWasmCallStack:202dbe040#08
2009
2010
read packet: $9c01000000000040e501000000000040fe01000000000040#
2010
2011
```
2011
2012
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.
2013
2016
2014
2017
## qWatchpointSupportInfo
2015
2018
Original file line number Diff line number Diff line change @@ -24,8 +24,10 @@ LLDB_PLUGIN_DEFINE(ProcessWasm)
24
24
25
25
ProcessWasm::ProcessWasm(lldb::TargetSP target_sp, ListenerSP listener_sp)
26
26
: 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 ());
29
31
}
30
32
31
33
void ProcessWasm::Initialize () {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ namespace wasm {
17
17
// / Each WebAssembly module has separated address spaces for Code and Memory.
18
18
// / A WebAssembly module also has a Data section which, when the module is
19
19
// / 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 };
21
21
22
22
// / For the purpose of debugging, we can represent all these separated 32-bit
23
23
// / 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 {
28
28
false ) {
29
29
// Wasm does not have a fixed set of registers but relies on a mechanism
30
30
// named local and global variables to store information such as the stack
31
- // pointer.
31
+ // pointer. The only actual register is the PC.
32
32
PrivateSetRegisterValue (0 , pc);
33
33
}
34
34
};
You can’t perform that action at this time.
0 commit comments