[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet

2019-06-10 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added a comment. It's the same for freebsd https://github.com/freebsd/freebsd/blob/master/sys/kern/link_elf.c#L291 although behind a GDB flag (which NetBSD doesn't seem to be: https://nxr.netbsd.org/xref/src/libexec/ld.elf_so/rtld.c#1040). ==

[Lldb-commits] [PATCH] D62501: Implement GetSharedLibraryInfoAddress

2019-06-10 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Initially one at a time but then thought it might be better to do it as a batch because I was afraid I was missing some dependency and would brake something unexpectedly. But I guess that since I've already landed D62168 it's probably fin

[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet

2019-06-10 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:2181 +template +Status NativeProcessLinux::ReadSVR4LibraryInfo(lldb::addr_t link_map_addr, + SV

[Lldb-commits] [PATCH] D62499: Create a generic handler for Xfer packets

2019-06-10 Thread António Afonso via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362982: Create a generic handler for Xfer packets (authored by aadsm, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet

2019-06-10 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 203947. aadsm added a comment. - Update test to just wait for the process to stop - Change ReadSVR4LibraryInfo signature to return an Expected to the list of libraries and stop taking params by ref. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-06-10 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 203948. aadsm added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62503/new/ https://reviews.llvm.org/D62503 Files: lldb/include/lldb/Host/common/NativeProcessProtocol.h lldb/source/Host/co

[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet

2019-06-11 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Yeah, that makes sense. I was thinking about this yesterday after checking the freebsd code. I was concerned if there's something different that I'm not aware of but we do have tests and I guess we can also override these functions if needed in the future. Repository:

[Lldb-commits] [PATCH] D62500: Add support to read aux vector values

2019-06-11 Thread António Afonso via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363098: Add support to read aux vector values (authored by aadsm, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org

[Lldb-commits] [PATCH] D63187: [LLDB] Fix FreeBSD build

2019-06-12 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. oops, thank you! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63187/new/ https://reviews.llvm.org/D63187 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-06-12 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added a comment. Yeah, that's a good question and I did think about it at the time I wrote D62715 . Here's my rationale: Regarding the chunk reading in the ReadMemory I was not sure because I don't know how common tha

[Lldb-commits] [PATCH] D62501: Implement GetSharedLibraryInfoAddress

2019-06-12 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 204422. aadsm added a comment. Improve tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62501/new/ https://reviews.llvm.org/D62501 Files: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp lldb/sour

[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet

2019-06-12 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 204423. aadsm added a comment. Herald added a subscriber: emaste. - Move SVR4 reading to NativeProcessELF - Made NetBSD and FreeBSD process implementations extend NativeProcessELF I'm not 100% confident on this last one because I don't have a net and free bsd

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-06-13 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added a comment. I see what you mean, this is a good point. Yes, like you say I'm assuming the string I want to read is in a page that I can read using the fast method. And in this situation I prefer to minimize the number of calls to ReadMemory than

[Lldb-commits] [PATCH] D62501: Implement GetSharedLibraryInfoAddress

2019-06-14 Thread António Afonso via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363458: Implement GetSharedLibraryInfoAddress (authored by aadsm, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org

[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet

2019-06-14 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 204850. aadsm added a comment. Only extend support to NetBSD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62502/new/ https://reviews.llvm.org/D62502 Files: lldb/include/lldb/Host/common/NativeProcessProtocol.

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-06-16 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 204977. aadsm added a comment. Herald added a subscriber: emaste. - Make ReadCStringFromMemory return llvm::Expected> - Add documentation - Address other comments - Created `static const size_t g_cache_line_size` to avoid calling llvm::sys::Process::getPageSize

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-06-16 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 204979. aadsm added a comment. - Address missing comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62503/new/ https://reviews.llvm.org/D62503 Files: lldb/include/lldb/Host/common/NativeProcessProtocol.h

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-06-17 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 205211. aadsm added a comment. - Add a test to cover cross page reads - Make cache_line_size a static const variable inside the function. - Fix how we're passing name_buffer to ReadCStringFromMemory. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[Lldb-commits] [PATCH] D62502: Implement xfer:libraries-svr4:read packet

2019-06-18 Thread António Afonso via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363707: Implement xfer:libraries-svr4:read packet (authored by aadsm, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-06-18 Thread António Afonso via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363750: Add ReadCStringFromMemory for faster string reads (authored by aadsm, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-06-25 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. I can't repro it right now so I prefer to revert it (I'm curious how this new function could influence those tests though). I actually thought this was sorted, sorry about that. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62503/new/ http

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-06-25 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Reverted here: https://reviews.llvm.org/rG9c10b620c0619611dfe062216459431955ac4801 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62503/new/ https://reviews.llvm.org/D62503 ___ lldb-commits mail

[Lldb-commits] [PATCH] D63868: Unify+fix remote XML libraries handling with the legacy one

2019-06-27 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. I'm not sure why `DynamicLoaderPOSIXDYLD::RendezvousBreakpointHit` happens only once, I thought I had fixed that here: D62168 . I don't think we can stop loading/unloading the libraries in `ProcessGDBRemote::LoadModules`. The windows dynami

[Lldb-commits] [PATCH] D62504: Avoid calling LoadModules twice when modules change

2019-06-27 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. @jankratochvil I imagine the first test to be failing because this patch doesn't handle correctly the unload (or rather as soon as it unloads one shared object it stops working as expected). I'm going to look at this today (right now it's 9am for me). Repository: rG LL

[Lldb-commits] [PATCH] D63868: Unify+fix remote XML libraries handling with the legacy one

2019-06-27 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. The `library` is part of the GDB protocol itself: https://sourceware.org/gdb/onlinedocs/gdb/Stop-Reply-Packets.html#Stop-Reply-Packets and it's to be used with conjunction of `qXfer:libraries:read` (or libraries-svr4 like we do here). Interesting, I'm not familiar with S

[Lldb-commits] [PATCH] D62504: Avoid calling LoadModules twice when modules change

2019-06-27 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. I looked into this a bit today and at one point in time (when the list of modules is being processed) it seems that some previously loaded modules are somehow removed (at least I stop seeing them in the `image list`) including the one where the rendezvous breakpoint is so

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-07-01 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Yap, that makes a lot of sense to me. I looked into this over the weekend and figured out the reason why it was broken (tl;dr: we can't use LoadModules) and created a tidier version of D63868 that, like D62504

[Lldb-commits] [PATCH] D62504: Avoid calling LoadModules twice when modules change

2019-07-01 Thread António Afonso via Phabricator via lldb-commits
aadsm abandoned this revision. aadsm added a comment. Replaced by D62503 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62504/new/ https://reviews.llvm.org/D62504 ___ l

[Lldb-commits] [PATCH] D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4

2019-07-01 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: labath, jankratochvil, clayborg. Herald added subscribers: lldb-commits, JDevlieghere, srhines. Herald added a project: LLDB. aadsm added a reviewer: xiaobai. Here's a replacement for D62504 . I thought I could u

[Lldb-commits] [PATCH] D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4

2019-07-01 Thread António Afonso via Phabricator via lldb-commits
aadsm marked 2 inline comments as done. aadsm added inline comments. Comment at: lldb/include/lldb/Target/Process.h:684 + ///A status object indicating if the operation was sucessful or not. + virtual Status LoadModules() { return Status("Not implemented"); }

[Lldb-commits] [PATCH] D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4

2019-07-01 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 207455. aadsm added a comment. Address comments, add GetAction that returns an enum with what to do. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64013/new/ https://reviews.llvm.org/D64013 Files: lldb/include

[Lldb-commits] [PATCH] D64112: Add plugin.process.gdb-remote.use-libraries-svr4 option

2019-07-02 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: labath, jankratochvil. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. This option allow the toggling of the libraries-svr4 usage in ProcessGDBRemote. It's a follow up of https://reviews.llvm.org/D62503#1564296 and it's me

[Lldb-commits] [PATCH] D64112: Add plugin.process.gdb-remote.use-libraries-svr4 option

2019-07-03 Thread António Afonso via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365059: Add plugin.process.gdb-remote.use-libraries-svr4 option (authored by aadsm, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https:

[Lldb-commits] [PATCH] D62503: Add ReadCStringFromMemory for faster string reads

2019-07-10 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. @jankratochvil I'm planning to follow Pavel's plan now that the new setting has landed and finally got some time for this. It will be: - Revert rL364751 (which is a revert itself) - Revert 9c10b620c061

[Lldb-commits] [PATCH] D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4

2019-07-10 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. @labath can I ask for a re-review on this one please? :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64013/new/ https://reviews.llvm.org/D64013 ___ lldb-commits mailing list ll

[Lldb-commits] [PATCH] D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4

2019-07-17 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp:185-207 + if ( + // When the previous and current states are consistent this is the first + // time we have been asked to u

[Lldb-commits] [PATCH] D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4

2019-07-17 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 210413. aadsm added a comment. Address comments. In the end I used nested switches for the GetAction function. I thought about it and I guess it boils down to personal preference. It's still harder for me to read than the if version so I put some empty lines t

[Lldb-commits] [PATCH] D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4

2019-07-17 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 210422. aadsm added a comment. Missed one function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64013/new/ https://reviews.llvm.org/D64013 Files: lldb/include/lldb/Target/Process.h lldb/source/Plugins/Dynam

[Lldb-commits] [PATCH] D64013: Correctly use GetLoadedModuleList to take advantage of libraries-svr4

2019-07-22 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 211141. aadsm added a comment. Address comments, also checks the LoadModules return on DynamicLoaderWindowsDYLD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64013/new/ https://reviews.llvm.org/D64013 Files: l

[Lldb-commits] [PATCH] D64992: [lldb][NFC] Cleanup mentions and code related to lldb-mi

2019-07-22 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. @teemperor This diff deleted all lldb-server and lldb-vscode tests :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64992/new/ https://reviews.llvm.org/D64992 ___ lldb-commits ma

[Lldb-commits] [PATCH] D87868: [RFC] When calling the process mmap try to call all found instead of just the first one

2020-10-18 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Should I still go ahead with this since @labath implemented the memory allocation on lldb-server? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87868/new/ https://reviews.llvm.org/D87868

[Lldb-commits] [PATCH] D87172: Check if debug line sequences are starting after the first code segment

2020-10-19 Thread António Afonso via Phabricator via lldb-commits
aadsm added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:506 +for (uint32_t i = 0; i < num_sections; ++i) { + SectionSP section_sp(section_list->GetSectionAtIndex(i)); + const addr_t section_file_address = section_sp->GetFile

[Lldb-commits] [PATCH] D87172: Check if debug line sequences are starting after the first code segment

2020-10-22 Thread António Afonso via Phabricator via lldb-commits
aadsm added inline comments. Comment at: lldb/test/Shell/SymbolFile/DWARF/line-entries-invalid-addresses.yaml:3 +# RUN: %lldb %t -b -o "image lookup -f main.cpp -l 2 -v" | FileCheck %s +# CHECK: LineEntry: {{.*}}main.cpp:2:{{.*}} + labath wrote: > I think you al

[Lldb-commits] [PATCH] D87172: Check if debug line sequences are starting after the first code segment

2020-10-22 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 300131. aadsm added a comment. Check all child sections and makes sure the section is an actual code section. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87172/new/ https://reviews.llvm.org/D87172 Files: lld

[Lldb-commits] [PATCH] D87172: Check if debug line sequences are starting after the first code segment

2020-10-28 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 301450. aadsm added a comment. - Fixed formatting issues - Updated comment on the reason we need to do this - Improved the lit test by also checking how many matches it found Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[Lldb-commits] [PATCH] D87173: Ignores functions that have a range starting outside of a code section

2020-10-28 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 301503. aadsm added a comment. Rewrote the test in lit. I had to do it in an non standard way. It seems that lldb will exit with an error code if you do -b -o of a command that doesn't "work", (e.g.: image lookup finds nothing). Since lit runs this with set -

[Lldb-commits] [PATCH] D87173: Ignores functions that have a range starting outside of a code section

2020-11-01 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 302150. aadsm added a comment. Used -s to feed commands and disabled errors when interpreting them Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87173/new/ https://reviews.llvm.org/D87173 Files: lldb/source/Pl

[Lldb-commits] [PATCH] D87172: Check if debug line sequences are starting after the first code segment

2020-11-01 Thread António Afonso via Phabricator via lldb-commits
aadsm added inline comments. Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:503-505 + if (section_list) { +InitializeFirstCodeAddress(*section_list); + } labath wrote: > clayborg wrote: > > remove braces > or even fold the declaration

[Lldb-commits] [PATCH] D87868: [RFC] When calling the process mmap try to call all found instead of just the first one

2020-11-01 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 302178. aadsm added a comment. Herald added subscribers: MaskRay, emaste. Herald added a reviewer: espindola. Also set the symbol as external when it is weak Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87868/new

[Lldb-commits] [PATCH] D70885: [lldb] Use explicit lldb commands on tests

2020-11-01 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 302180. aadsm added a comment. Herald added a subscriber: JDevlieghere. Herald added a reviewer: JDevlieghere. Use set and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70885/new/ https://reviews.llvm.org/

[Lldb-commits] [PATCH] D87173: Ignores functions that have a range starting outside of a code section

2020-11-08 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 303746. aadsm added a comment. Merged the 2 run/checks into one Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87173/new/ https://reviews.llvm.org/D87173 Files: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTPars

[Lldb-commits] [PATCH] D87172: Check if debug line sequences are starting after the first code segment

2020-11-09 Thread António Afonso via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG265a38fbc547: Check if debug line sequences are starting after the first code segment (authored by aadsm). Repository: rG LLVM Github Monorepo CH

[Lldb-commits] [PATCH] D87173: Ignores functions that have a range starting outside of a code section

2020-11-09 Thread António Afonso via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdf30bc0168d2: Ignores functions that have a range starting outside of a code section (authored by aadsm). Repository: rG LLVM Github Monorepo CHA

[Lldb-commits] [PATCH] D87172: Check if debug line sequences are starting after the first code segment

2020-11-09 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. reverting because I'm not able to repro the fails, so need more time to figure it out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87172/new/ https://reviews.llvm.org/D87172 ___

[Lldb-commits] [PATCH] D87173: Ignores functions that have a range starting outside of a code section

2020-11-19 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. When I landed this I got test errors on the windows machine (the same tests pass on the other machine). I tried to repro this on 2 different machines I was able to get access but to no avail. These are the failing tests: http://lab.llvm.org:8011/#/builders/83/builds/644

[Lldb-commits] [PATCH] D95008: Revert "Revert "Ignores functions that have a range starting outside of a code section""

2021-01-19 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added a reviewer: stella.stamenova. Herald added a reviewer: shafik. aadsm requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: lldb-commits, sstefan1. Herald added a project: LLDB. This reverts commit a9dcd15f50dc27ca3

[Lldb-commits] [PATCH] D94997: [lldb][lldb-vscode] Updated implementation of 'launch' and 'attach' requests to not create auxiliary target in case "launchCommands" and "attachCommands" are provided.

2021-01-20 Thread António Afonso via Phabricator via lldb-commits
aadsm added inline comments. Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:1558 + if (!launchCommands.empty()) { +// if "launchCommands" are provided, then they are expected to make the +// launch happen for launch requests and they replace the normal logic that ---

[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol

2020-05-11 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 263206. aadsm added a comment. Remove debugging leftovers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79726/new/ https://reviews.llvm.org/D79726 Files: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/l

[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol

2020-05-11 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: clayborg, wallace. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. aadsm updated this revision to Diff 263206. aadsm added a comment. Remove debugging leftovers Adding this in line with "stopCommands" and "exitCommands" s

[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol

2020-05-11 Thread António Afonso via Phabricator via lldb-commits
aadsm marked 2 inline comments as done. aadsm added a comment. I chose the name terminate because this happens just before the `terminated` event is sent back to the client. Comment at: lldb/test/API/tools/lldb-vscode/attach/TestVSCode_attach.py:49-67 +@skipIfDarwin @

[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol

2020-05-11 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 263299. aadsm added a comment. Rebase and remove unwanted debug code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79726/new/ https://reviews.llvm.org/D79726 Files: lldb/packages/Python/lldbsuite/test/tools/ll

[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol

2020-05-12 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. > I gotta say I don't understand the difference between "exit" and "terminate" > commands, as both seem to happen pretty at once. Is the difference that > "exit" commands are run only when the inferior exits freely on its own, and > not when we forcefully kill it? And tha

[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol

2020-05-12 Thread António Afonso via Phabricator via lldb-commits
aadsm marked 2 inline comments as done. aadsm added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py:250-251 def cleanup(): -self.vscode.request_disconnect(terminateDebuggee=True) +if disco

[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol

2020-05-12 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py:250-251 def cleanup(): -self.vscode.request_disconnect(terminateDebuggee=True) +if disco

[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol

2020-05-12 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py:250-251 def cleanup(): -self.vscode.request_disconnect(terminateDebuggee=True) +if disco

[Lldb-commits] [PATCH] D79757: Use IPv4 for Android connections

2020-05-14 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. @clayborg the support we added was for the lldb-server. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79757/new/ https://reviews.llvm.org/D79757 ___ lldb-commits mailing list lld

[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol

2020-05-14 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 264143. aadsm added a comment. Updated README.md, package.json to document the new option. Also refactored the test support a bit to allow easier testing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79726/new/

[Lldb-commits] [PATCH] D79726: Add terminateCommands to lldb-vscode protocol

2020-05-19 Thread António Afonso via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa3609b0ec685: Add terminateCommands to lldb-vscode protocol (authored by aadsm, committed by António Afonso ). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[Lldb-commits] [PATCH] D80659: [lldb-vscode] Redirect stderr and stdout to DAPs console message

2020-05-27 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: clayborg, labath, rmaz. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Doing this for 2 main reasons: - Avoid stdout from corrupting DAP messages - Make sure we can see in VSCode (or any other DAP client) the same output

[Lldb-commits] [PATCH] D80659: [lldb-vscode] Redirect stderr and stdout to DAPs console message

2020-05-28 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. thanks for the feedback, I'll read it more carefully later. As for the tests it should be easy to set up, didn't want to spend time on that before we agreed on doing it this way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[Lldb-commits] [PATCH] D80659: [lldb-vscode] Redirect stderr and stdout to DAPs console message

2020-05-29 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Absolutely, I'll look into that first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80659/new/ https://reviews.llvm.org/D80659 ___ lldb-commits mailing list lldb-commits@lists.l

[Lldb-commits] [PATCH] D81978: Redo of Add terminateCommands to lldb-vscode protocol

2020-06-16 Thread António Afonso via Phabricator via lldb-commits
aadsm accepted this revision. aadsm added a comment. This revision is now accepted and ready to land. Thank you for this! <3 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81978/new/ https://reviews.llvm.org/D81978 ___

[Lldb-commits] [PATCH] D80659: [lldb-vscode] Redirect stderr and stdout to DAPs console message

2020-07-09 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 276894. aadsm added a comment. This update still doesn't add windows support but I just want to get a feel that I'm going on the right direction. It addresses the following: - redirect stdout/err as early as possible to avoid something writing to it, and only

[Lldb-commits] [PATCH] D70882: Add skipInitFiles option to lldb-vscode initialize

2019-12-01 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: clayborg, lanza, wallace. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. lldb has the -x option but this doesn't exist at all for lldb-vscode. To be honest my main goal is the ability to run the lldb-vscode tests without

[Lldb-commits] [PATCH] D70882: Add skipInitFiles option to lldb-vscode initialize

2019-12-01 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 231629. aadsm added a comment. Oops, wrnog default Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70882/new/ https://reviews.llvm.org/D70882 Files: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.p

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-01 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: clayborg, lanza, wallace. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. lldb-vscode has an issue when run in stdout/stdin mode because it will send all stdout generated by scripts through well.. stdout :) This is problem

[Lldb-commits] [PATCH] D70884: [lldb] Fix TestFormattersSBAPI test

2019-12-01 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: clayborg, lanza, wallace. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. This test was broken in two ways: - Using the wrong API (e.g.: format = instead of SetFormat) - The hex checker was only checking "01" which will pa

[Lldb-commits] [PATCH] D70885: [lldb] Use explicit lldb commands on tests

2019-12-01 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: clayborg, lanza, wallace. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Not a big deal but might be if in the future we had another command starting with br. I found this because I had an lldbinit that added a breakpad c

[Lldb-commits] [PATCH] D70886: [lldb-vscode] capture the debuggers file handles before lldbinit runs

2019-12-01 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: clayborg, lanza, wallace. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. We need to do this before we create the debugger because the commands run in the lldbinit might do output to these handlers as well. Repository:

[Lldb-commits] [PATCH] D70887: [lldb] Use realpath to avoid issues with symlinks in source paths

2019-12-01 Thread António Afonso via Phabricator via lldb-commits
aadsm created this revision. aadsm added reviewers: clayborg, lanza, wallace. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. I was not able to sucessfully run TestDSYMSourcePathRemapping.py because the source mapping was using /tmp/ but the debugger was checking /private/t

[Lldb-commits] [PATCH] D70882: Add skipInitFiles option to lldb-vscode initialize

2019-12-02 Thread António Afonso via Phabricator via lldb-commits
aadsm planned changes to this revision. aadsm added a comment. Yes, I'll change this to env it makes more sense. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70882/new/ https://reviews.llvm.org/D70882 ___

[Lldb-commits] [PATCH] D70886: [lldb-vscode] capture the debuggers file handles before lldbinit runs

2019-12-02 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. The way phabricator shows the diff is tricky, this change has nothing to do with D70882 and stands by itself. The important part here is making the `g_vsc.debugger.SetOutputFileHandle(out, true); g_vsc.debugger.SetErrorFileHandle(out, fal

[Lldb-commits] [PATCH] D70884: [lldb] Fix TestFormattersSBAPI test

2019-12-02 Thread António Afonso via Phabricator via lldb-commits
aadsm marked an inline comment as done. aadsm added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py:71 -format.format = lldb.eFormatOctal +format.SetFormat(lldb.eFormatOctal) category.AddTyp

[Lldb-commits] [PATCH] D70885: [lldb] Use explicit lldb commands on tests

2019-12-02 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Yeah, that's what I do in D70882 . I still think tests can be more robust by using explicit lldb command names but don't really care much :). I'm happy to abandon it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-02 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Yes. This happens when lldb-vscode is run in stdin/stdout mode (which is what happens in tests and I've also seen some IDEs doing the same) and installed commands are doing "print". In this case the client gets data that does not start with `Content-Length`. This fixes th

[Lldb-commits] [PATCH] D70887: [lldb] Use realpath to avoid issues with symlinks in source paths

2019-12-02 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 231740. aadsm added a comment. Solve this at the failing test level. We can't be sure of the filename will end up in the debug info so we just add both keys to the mapping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[Lldb-commits] [PATCH] D70882: Add environment var LLDBVSCODE_SKIP_INIT_FILES to lldb-vscode

2019-12-02 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 231759. aadsm added a comment. Use an env var instead Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70882/new/ https://reviews.llvm.org/D70882 Files: lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscod

[Lldb-commits] [PATCH] D70884: [lldb] Fix TestFormattersSBAPI test

2019-12-02 Thread António Afonso via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGafd5d912812e: [lldb] Fix TestFormattersSBAPI test (authored by aadsm, committed by António Afonso ). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[Lldb-commits] [PATCH] D70882: Add environment var LLDBVSCODE_SKIP_INIT_FILES to lldb-vscode

2019-12-02 Thread António Afonso via Phabricator via lldb-commits
aadsm updated this revision to Diff 231807. aadsm added a comment. Put the logic into a function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70882/new/ https://reviews.llvm.org/D70882 Files: lldb/packages/Python/lldbsuite/test/tools/lldb-vscod

[Lldb-commits] [PATCH] D70886: [lldb-vscode] capture the debuggers file handles before lldbinit runs

2019-12-03 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. > Maybe you could do something similar to LocalLLDBInit.test ? That test uses the `lldb` `-S` (and others) flags that `lldb-vscode` doesn't support :(. These flags should really be added to the initialize packet but they're very specific to lldb and the DAP doesn't suppor

[Lldb-commits] [PATCH] D70883: [vscode.py] Make read_packet only return None when EOF

2019-12-05 Thread António Afonso via Phabricator via lldb-commits
aadsm abandoned this revision. aadsm added a comment. Fair enough, I haven't seen evidence of this (haven't searched for it) but I imagine IDEs need to ignore this as well otherwise they just barf if they're expecting `Content-Length` and a wild print appears. The notion of stdout of SBDebugger

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

2020-01-23 Thread António Afonso via Phabricator via lldb-commits
aadsm added a comment. Yeah, I'm not sure why the LoadModules function is calling target.SetExecutableModule. It is true that the libraries-svr4 will not include the main executable in its list. This code was added in the context of providing qXfer:libraries support here: https://reviews.llvm.o

<    1   2   3