[Lldb-commits] [PATCH] D78801: [LLDB] Add class WasmProcess for WebAssembly debugging

2022-01-28 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. Thanks @xujuntwt95329! I am very happy that this was useful for WebAssembly Micro Runtime! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78801/new/ https://reviews.llvm.org/D78801

[Lldb-commits] [PATCH] D78801: [LLDB] Add class WasmProcess for WebAssembly debugging

2022-01-29 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. Hi @xujuntwt95329, Honestly I wasn't thinking to support multithreading with this initial patch so I am not surprised that it doesn't work. You are right, we should add thread information to the messages. Actually I am a little surprised that the patch still works after

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-07 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 243271. paolosev marked 5 inline comments as done. paolosev added a comment. In D72751#1864138 , @labath wrote: > Ok, let's give this one more try. I have a couple of inline comments for the > further simplification

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-12 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 244300. paolosev added a comment. Fix patch after rebasing: - Use macros to initialize plugins in SystemInitializer. - Move tests from /packages/Python/lldbsuite/test/functionalities/gdb_remote_client/ to /test/API/functionalities/gdb_remote_client/ Repo

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-14 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D72751#1869268 , @labath wrote: > yeah, go for it. Hi @labath, can I ask you the favor to land this patch for me? I have rebased it because the logic of SystemInitializers have changed with new macros. I asked commit acces

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-17 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. @JDevlieghere added inline comments: > lldb/source/API/SystemInitializerFull.cpp 244 > What's the rationale here? Plugins shouldn't rely on the order in which they > are initialized. This breaks when the initializers are auto generated. Can we > remove this dependency

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-17 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. > I think it depends on whether the `DynamicLoaderStatic` should be a fallback. > If it doesn't make sense then yes, I think we should reject that triple there. It should not be a fallback. Ok! I'll create a new patch with this change. Repository: rG LLVM Github Mon

[Lldb-commits] [PATCH] D74780: [lldb/Plugin] Reject WASM and Hexagon in DynamicLoaderStatic

2020-02-18 Thread Paolo Severini via Phabricator via lldb-commits
paolosev accepted this revision. paolosev added a comment. This revision is now accepted and ready to land. In D74780#1881297 , @JDevlieghere wrote: > Sorting the plugins so the static loader is initialized before the WASM > loader should exercise this c

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-25 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D72751#1892514 , @vsk wrote: > Hi @paolosev, the lldb sanitized bot is flagging a container-overflow error > here. I know that this /can/ have FPs when sanitized and unsanitized code is > mixed, but we should be in purely san

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-25 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. > Hi @paolosev, the lldb sanitized bot is flagging a container-overflow error > here. I know that this /can/ have FPs when sanitized and unsanitized code is > mixed, but we should be in purely sanitized code here, and this looks like a > valid report. PTAL. I think I

[Lldb-commits] [PATCH] D75200: AddressSanitizer failure in MemoryCache

2020-02-26 Thread Paolo Severini via Phabricator via lldb-commits
paolosev created this revision. paolosev added reviewers: labath, vsk, JDevlieghere, clayborg. paolosev added a project: LLDB. Herald added subscribers: lldb-commits, sunfish, aheejin. The original discussion for this issues is here . The lldb sanitized b

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-26 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D72751#1892925 , @labath wrote: > > Who is the owner of this MemoryCache code I should ask for a review? > > It sounds like the fix will be fairly straightforward. I think anyone on this > thread should be able to review that.

[Lldb-commits] [PATCH] D75200: AddressSanitizer failure in MemoryCache

2020-02-26 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 246868. paolosev added a comment. In D75200#1894162 , @clayborg wrote: > Not sure this is the right fix. The calling code should listen to how many > bytes were actually read from memory and avoid touching any bytes.

[Lldb-commits] [PATCH] D75200: AddressSanitizer failure in MemoryCache

2020-02-26 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. The Harbormaster errors don't seem to be real failures: /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/lldb/source/Core/Module.cpp:9:10: error: 'lldb/Core/Module.h' file not found [clang-diagnostic-error] #include "lldb/Core/Module.h" ^ /

[Lldb-commits] [PATCH] D75200: [LLDB] AddressSanitizer failure in MemoryCache

2020-02-27 Thread Paolo Severini via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG256e61699b19: [LLDB] Fix AddressSanitizer failure in MemoryCache (authored by paolosev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75200/new/ https://re

[Lldb-commits] [PATCH] D78978: [LLDB] Add support for WebAssembly debugging

2021-01-06 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D78978#2481358 , @vwzm228 wrote: > Is there any progress about such patch and D78801 > ? > > I have implemented the debugging feature in our Wasm VM based on > https://reviews.llvm.org/D78801

[Lldb-commits] [PATCH] D78978: [LLDB] Add support for WebAssembly debugging

2021-01-06 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D78978#2483354 , @dblaikie wrote: > Usually the thing is to ping the review thread at most weekly & maybe search > around for specific reviewers to ask if you're met with a lot of silence. There was not a lot of feedback on t

[Lldb-commits] [PATCH] D78801: [LLDB] Add class WasmProcess for WebAssembly debugging

2021-01-06 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a subscriber: vwzm228. paolosev added a comment. In D78978#2481358 , @vwzm228 wrote: > Is there any progress about such patch and D78801 > ? > > I have implemented the debugging feature in our Wasm VM based

[Lldb-commits] [PATCH] D78978: [LLDB] Add support for WebAssembly debugging

2021-01-11 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D78978#2488134 , @aprantl wrote: > What's the testing story for WASM going to be? Thanks for the feedback @aprantl! This patch was also create to show a possible alternative to https://reviews.llvm.org/D78801, but D78801

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-04-24 Thread Paolo Severini via Phabricator via lldb-commits
paolosev created this revision. paolosev added reviewers: clayborg, labath. paolosev added a project: LLDB. Herald added subscribers: lldb-commits, sunfish, aheejin, jgravelle-google, sbc100, aprantl, mgorny. paolosev marked 2 inline comments as done. paolosev added a comment. What is the best wa

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-04-24 Thread Paolo Severini via Phabricator via lldb-commits
paolosev marked 2 inline comments as done. paolosev added a comment. What is the best way to test classes WasmProcessGDBRemote and UnwindWasm? Comment at: lldb/source/Plugins/Process/wasm/ProcessWasm.cpp:92 +size_t buffer_size, size_t &si

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-04-26 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 260216. paolosev added a comment. I am adding all the pieces to this patch to make the whole picture clearer; I thought to add a piece at the time to simplify reviews, but probably it ended up making things more obscure. I can always split this patch later

[Lldb-commits] [PATCH] D78978: [LLDB] Add support for WebAssembly debugging

2020-04-27 Thread Paolo Severini via Phabricator via lldb-commits
paolosev created this revision. paolosev added reviewers: labath, clayborg. paolosev added a project: LLDB. Herald added subscribers: lldb-commits, sunfish, aheejin, jgravelle-google, sbc100, aprantl, mgorny, dschuff. paolosev edited the summary of this revision. This patch is a refactoring of h

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-04-27 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. Thanks for your comments! I have refactored this code in a separate patch, https://reviews.llvm.org/D78978, removing WasmProcessGDBRemote, moving part of the logic into ProcessGDBRemote but still keeping class UnwindWasm. Let me know what you think... Repository: rG

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-04-28 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D78801#2007083 , @clayborg wrote: > So is there memory to be read from the WASM runtime? Couldn't > DW_OP_WASM_location 0x0 +8 be turned into an address that can be used to read > the variable? It is also unclear what DW_OP_s

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-04-28 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D78801#2009103 , @clayborg wrote: > Thanks for the explanations if everything WASM related. I now understand much > better what you have. > > > Read Wasm memory. > > IN : $qWasmMem:frame_index;addr;len > > OUT: $xx..xx > > f

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-04-28 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D78801#2009128 , @clayborg wrote: > Could we just always use memory reading and have the address contain more > info? Right now you have the top 32 bits for the module ID. Could it be > something like: > > struct WasmAddres

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-04-29 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D78801#2009856 , @labath wrote: > What if the wasm engine actually made some effort to present a more > "conventional" view of the wasm "process"? I.e., in addition to the "implied" > PC, we could have an "implied" SP (and ma

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-04-29 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D78801#2010536 , @ted wrote: > Hi Paulo, > @clayborg asked me to look at this, because I've worked with systems that > have multiple address spaces. I was thinking, instead of a WebAssembly > specific memory read, we should

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-04-29 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. Also, to eliminate `qWasmCallStack` we could maybe add the call stack (a list of PCs) to the stop packet. The format of a stop packet is: T AA n1:r1;n2:r2;… The program received signal number AA (a two-digit hexadecimal number). [...] Each ‘n:r’ pair is interpre

[Lldb-commits] [PATCH] D78801: [LLDB] Add class ProcessWasm for WebAssembly debugging

2020-05-01 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. > The thing I am resisting is to put all of this stuff in the the > ProcessGDBRemote class. Instead of trying to generalize it so that it can > handle everything (and generalize to the wrong thing), I very much like the > idea of introducing a `WasmProcess` plugin clas

[Lldb-commits] [PATCH] D78801: [LLDB] Add class WasmProcess for WebAssembly debugging

2020-05-08 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. Comment at: lldb/source/Plugins/Process/wasm/WasmProcess.cpp:71-76 + if (vm_addr < 0x1) { +if (WasmReadMemory(0 /*frame_index*/, vm_addr, buf, size)) { + return size; +} +return 0; + } else clayborg wrote: >

[Lldb-commits] [PATCH] D78801: [LLDB] Add class WasmProcess for WebAssembly debugging

2020-05-21 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. Hello @clayborg , @labath, Any thoughts on this latest patch? :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78801/new/ https://reviews.llvm.org/D78801 ___ lldb-commits mai

[Lldb-commits] [PATCH] D78801: [LLDB] Add class WasmProcess for WebAssembly debugging

2020-06-18 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. > What about replacing ProcessReadMemory(addr_t addr, ...) with > ProcessReadMemory(Address addr, ...), or even banning the use of lldb::addr_t > on everywhere except in the bowels of Process subclasses and as an > interchange for getting addresses as text from users

[Lldb-commits] [PATCH] D71575: [LLDB] Add initial support for WebAssembly debugging

2019-12-16 Thread Paolo Severini via Phabricator via lldb-commits
paolosev created this revision. paolosev added reviewers: jasonmolenda, clayborg. paolosev added projects: LLDB, LLVM. Herald added subscribers: llvm-commits, lldb-commits, sunfish, aheejin, jgravelle-google, sbc100, aprantl, mgorny, dschuff. Current versions of Clang emit (partial) DWARF debug i

[Lldb-commits] [PATCH] D71575: [LLDB] Add initial support for WebAssembly debugging

2019-12-17 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 234463. paolosev marked 2 inline comments as done. paolosev removed a project: LLVM. paolosev added a comment. Addressed first review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71575/new/ https://reviews.llvm.org/D71575 Files: lldb/

[Lldb-commits] [PATCH] D71575: [LLDB] Add initial support for WebAssembly debugging

2019-12-17 Thread Paolo Severini via Phabricator via lldb-commits
paolosev marked 43 inline comments as done. paolosev added a comment. Thanks for all the comments! I am updating the code following your suggestions. Next step will be to split this into three distinct patches, as suggested by Pavel. Comment at: lldb/source/Plugins/DynamicLoa

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2019-12-18 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 234471. paolosev retitled this revision from "[LLDB] Add initial support for WebAssembly debugging" to "[LLDB] Add ObjectFileWasm plugin for WebAssembly debugging". paolosev edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.ll

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2019-12-18 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 234474. paolosev set the repository for this revision to rG LLVM Github Monorepo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71575/new/ https://reviews.llvm.org/D71575 Files: lldb/include/lldb/Utility/Arch

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2019-12-20 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 234920. paolosev marked 7 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71575/new/ https://reviews.llvm.org/D71575 Files: lldb/include/lldb/Utility/ArchSpec.h lldb/source/API/System

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2019-12-20 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added inline comments. Comment at: lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp:45 + +/// Reads a LEB128 variable-length unsigned integer, limited to 7 bits. +llvm::Optional GetVaruint7(DataExtractor §ion_header_data, aprantl wrote: > The LLVM

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-03 Thread Paolo Severini via Phabricator via lldb-commits
paolosev marked 10 inline comments as done. paolosev added a comment. In D71575#1793791 , @labath wrote: > A bunch more comments from me. :) > > A higher level question I have is whether there's something suitable within > llvm for parsing wasm object fil

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-05 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added inline comments. Comment at: lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp:46-63 +llvm::Optional GetVaruint7(DataExtractor §ion_header_data, +lldb::offset_t *offset_ptr) { + lldb::offset_t initial_offset = *offset_ptr;

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-05 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 236237. paolosev marked 8 inline comments as done. paolosev added a comment. Addressed more review comments: - removed code to manage "external_debug_info" sections; logic for this will be implemented in the symbol vendor code. - modified test code, from un

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-08 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added inline comments. Comment at: lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp:49 + lldb::offset_t initial_offset = *offset_ptr; + uint64_t value = section_header_data.GetULEB128(offset_ptr); + if (*offset_ptr == initial_offset || value > 127) -

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-08 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 236868. paolosev marked 20 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71575/new/ https://reviews.llvm.org/D71575 Files: lldb/include/lldb/Utility/ArchSpec.h lldb/include/lldb/Uti

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-10 Thread Paolo Severini via Phabricator via lldb-commits
paolosev marked 2 inline comments as done. paolosev added inline comments. Comment at: lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp:342-343 +section_type, // Section type. +sect_info.offset & 0x, /

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-10 Thread Paolo Severini via Phabricator via lldb-commits
paolosev marked an inline comment as done. paolosev added a comment. I apologize for the noob question, but how do I schedule a build for this diff with Harbormaster? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71575/new/ https://reviews.llvm.or

[Lldb-commits] [PATCH] D72650: [LLDB] Add SymbolVendorWasm plugin for WebAssembly debugging

2020-01-13 Thread Paolo Severini via Phabricator via lldb-commits
paolosev created this revision. paolosev added reviewers: clayborg, labath, aprantl, sbc100, teemperor. paolosev added a project: LLDB. Herald added subscribers: lldb-commits, sunfish, aheejin, jgravelle-google, mgorny. Add plugin class SymbolVendorWasm, with the logic to manage debug symbols for

[Lldb-commits] [PATCH] D72650: [LLDB] Add SymbolVendorWasm plugin for WebAssembly debugging

2020-01-14 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 238128. paolosev added a comment. Added "lldb-test object-file" test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72650/new/ https://reviews.llvm.org/D72650 Files: lldb/source/API/SystemInitializerFull.cp

[Lldb-commits] [PATCH] D72650: [LLDB] Add SymbolVendorWasm plugin for WebAssembly debugging

2020-01-14 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D72650#1819403 , @labath wrote: > The patch looks pretty good. A reasonable way to test this would be again via > `lldb-test object-file` . The command dumps the "unified section list" of the > module, so if the debug info se

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-14 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 238168. paolosev marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71575/new/ https://reviews.llvm.org/D71575 Files: lldb/include/lldb/Utility/ArchSpec.h lldb/source/API/System

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-14 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added inline comments. Comment at: lldb/source/Utility/DataExtractor.cpp:914 +/// Extract an unsigned LEB128 number with a specified max value. If the +/// extracted value exceeds "max_value" the offset will be left unchanged and +/// llvm::None will be returned. ---

[Lldb-commits] [PATCH] D72650: [LLDB] Add SymbolVendorWasm plugin for WebAssembly debugging

2020-01-14 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 238177. paolosev added a comment. Rebasing from D71575 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72650/new/ https://reviews.llvm.org/D72650 Files: lldb/source/API/Syst

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-01-14 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. What is the best way to test this class? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72751/new/ https://reviews.llvm.org/D72751 ___ lldb-commits mailing list lldb-commits@li

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-01-14 Thread Paolo Severini via Phabricator via lldb-commits
paolosev created this revision. paolosev added reviewers: labath, clayborg, aprantl, sbc100, teemperor. paolosev added a project: LLDB. Herald added subscribers: lldb-commits, sunfish, aheejin, jgravelle-google, mgorny. paolosev added a comment. What is the best way to test this class? Add a dy

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-15 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D71575#1821312 , @labath wrote: > Thanks. I think this is looking very good now. Excited to have this ready. > > Do you have commit access? No, I certainly don't have commit access, this would be my first accepted patch. :)

[Lldb-commits] [PATCH] D72650: [LLDB] Add SymbolVendorWasm plugin for WebAssembly debugging

2020-01-15 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 238342. paolosev added a comment. Modified test to have two "inlined" yaml files and use "yaml2obj --docnum". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72650/new/ https://reviews.llvm.org/D72650 Files:

[Lldb-commits] [PATCH] D71575: [LLDB] Add ObjectFileWasm plugin for WebAssembly debugging

2020-01-15 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D71575#1823252 , @jingham wrote: > BTW, I had to fix this patch (cd9e5c32302cd3b34b796683eedb072c6a1cfdc1 > ) to > build on macOS. uint64_t and size_t are

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-01-22 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 239784. paolosev added a comment. I have verified the logic of the dynamic loader quite carefully, but there are a couple of things to clarify. A Wasm module is loaded at a 64 bit address, where the upper 32 bits are used as module identifier. Let’s say th

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-01-23 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 240077. paolosev added a comment. Thanks for the explanation! I wasn't quite clear on "executable module" here, but after your comments I realized that `Target::SetExecutableModule()` should not probably be called also for Wasm modules. The point is that `O

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-01-24 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 240262. paolosev added a comment. Modified to set `m_file_offset` to be the correct offset of the Code section. This also simplifies the code in ObjectFileWasm to avoid a special case for the code section in `ObjectFileWasm::SetLoadAddress`. The DWARF code

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-01-27 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 240711. paolosev added a comment. In D72751#1841498 , @labath wrote: > Thanks. I am glad that we were able to sort that out. > > Now that there's nothing wasm-specific in > `DynamicLoaderWasmDYLD::LoadModuleAtAddress

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-01-27 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. Comments inline... >> In D72751#1835502 , @paolosev wrote: >> >>> The first is that we need to call `Target::SetSectionLoadAddress()` twice, >>> from two different places. First we need to call >>> `Target::SetSectionLoadAddres

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-01-29 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. Regarding: >> - make the base DynamicLoader class instantiatable, and use it whenever we >> fail to find a specialized plugin >> - same as above, but only do that for ProcessGDBRemote instances >> - make ProcessGDBRemote call LoadModules() itself if no dynamic loader >

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-01-31 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 241824. paolosev marked 2 inline comments as done. paolosev added a comment. Fixed the tests as suggested, and also added a couple more tests, to cover both the case where the Wasm module is loaded from memory and the case where it is loaded from a file. >

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-04 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 242494. paolosev added a comment. Rebasing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72751/new/ https://reviews.llvm.org/D72751 Files: lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_cl

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-05 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 242733. paolosev added a comment. Fixing ObjectFile/wasm tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72751/new/ https://reviews.llvm.org/D72751 Files: lldb/packages/Python/lldbsuite/test/functiona

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-05 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. Thank you Derek, Jonas; I am sorry for all the trouble... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72751/new/ https://reviews.llvm.org/D72751 ___ lldb-commits mailing lis

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-05 Thread Paolo Severini via Phabricator via lldb-commits
paolosev added a comment. In D72751#1860950 , @max-kudr wrote: > There is Windows Build Bot failure > http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/13427. Can > you please fix or revert it? > > Cannot open include file: > 'Plugins/Dy

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-06 Thread Paolo Severini via Phabricator via lldb-commits
paolosev updated this revision to Diff 243045. paolosev added a comment. Modified tests to be compatible with Python3. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72751/new/ https://reviews.llvm.org/D72751 Files: lldb/packages/Python/lldbsuit

[Lldb-commits] [PATCH] D72751: [LLDB] Add DynamicLoaderWasmDYLD plugin for WebAssembly debugging

2020-02-06 Thread Paolo Severini via Phabricator via lldb-commits
paolosev reopened this revision. paolosev added a comment. This revision is now accepted and ready to land. In D72751#1862140 , @labath wrote: > As promised, here are the comments on the new tests. I think that most of the > py3 incompatibilities will go