================ @@ -667,138 +736,331 @@ static auto testExpressionVendorExtensions(lldb::ModuleSP module_sp, TEST(DWARFExpression, Extensions) { const char *yamldata = R"( ---- !ELF +--- !WASM FileHeader: - Class: ELFCLASS64 - Data: ELFDATA2LSB - Type: ET_EXEC - Machine: EM_386 -DWARF: - debug_abbrev: - - Table: - - Code: 0x00000001 - Tag: DW_TAG_compile_unit - Children: DW_CHILDREN_no - debug_info: - - Version: 4 - AddrSize: 4 - Entries: - - AbbrCode: 0x1 - - AbbrCode: 0x0 + Version: 0x1 +Sections: + - Type: TYPE + Signatures: + - Index: 0 + ParamTypes: + - I32 + ReturnTypes: + - I32 + - Type: FUNCTION + FunctionTypes: [ 0 ] + - Type: TABLE + Tables: + - Index: 0 + ElemType: FUNCREF + Limits: + Flags: [ HAS_MAX ] + Minimum: 0x1 + Maximum: 0x1 + - Type: MEMORY + Memories: + - Flags: [ HAS_MAX ] + Minimum: 0x100 + Maximum: 0x100 + - Type: GLOBAL + Globals: + - Index: 0 + Type: I32 + Mutable: true + InitExpr: + Opcode: I32_CONST + Value: 65536 + - Type: EXPORT + Exports: + - Name: memory + Kind: MEMORY + Index: 0 + - Name: square + Kind: FUNCTION + Index: 0 + - Name: __indirect_function_table + Kind: TABLE + Index: 0 + - Type: CODE + Functions: + - Index: 0 + Locals: + - Type: I32 + Count: 1 + - Type: I32 + Count: 1 + - Type: I32 + Count: 1 + - Type: I32 + Count: 1 + - Type: I32 + Count: 1 + - Type: I32 + Count: 1 + Body: 2300210141102102200120026B21032003200036020C200328020C2104200328020C2105200420056C210620060F0B + - Type: CUSTOM + Name: name + FunctionNames: + - Index: 0 + Name: square + GlobalNames: + - Index: 0 + Name: __stack_pointer + - Type: CUSTOM + Name: .debug_abbrev + Payload: 011101250E1305030E10171B0E110112060000022E01110112064018030E3A0B3B0B271949133F1900000305000218030E3A0B3B0B49130000042400030E3E0B0B0B000000 + - Type: CUSTOM + Name: .debug_info + Payload: 510000000400000000000401670000001D005E000000000000000A000000020000003C00000002020000003C00000004ED00039F5700000001014D0000000302910C0400000001014D000000000400000000050400 + - Type: CUSTOM + Name: .debug_str + Payload: 696E740076616C756500513A5C70616F6C6F7365764D5346545C6C6C766D2D70726F6A6563745C6C6C64625C746573745C4150495C66756E6374696F6E616C69746965735C6764625F72656D6F74655F636C69656E745C737175617265007371756172652E6300636C616E672076657273696F6E2031382E302E30202868747470733A2F2F6769746875622E636F6D2F6C6C766D2F6C6C766D2D70726F6A65637420373535303166353336323464653932616166636532663164613639386232343961373239336463372900 + - Type: CUSTOM + Name: .debug_line + Payload: 64000000040020000000010101FB0E0D000101010100000001000001007371756172652E6300000000000005020200000001000502250000000301050A0A010005022C00000005120601000502330000000510010005023A0000000503010005023E000000000101 )"; - SubsystemRAII<FileSystem, HostInfo, TypeSystemClang, ObjectFileELF, - CustomSymbolFileDWARF> + SubsystemRAII<FileSystem, HostInfo, ObjectFileWasm, SymbolVendorWasm> subsystems; + // Set up a wasm target + ArchSpec arch("wasm32-unknown-unknown-wasm"); + lldb::PlatformSP host_platform_sp = + platform_linux::PlatformLinux::CreateInstance(true, &arch); + ASSERT_TRUE(host_platform_sp); + Platform::SetHostPlatform(host_platform_sp); ---------------- JDevlieghere wrote:
Not currently, but if someone wanted to expose a platform server from their runtime that would allow you to attach to different processes that could be interesting. https://github.com/llvm/llvm-project/pull/151010 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits