[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. In D119797#3331419 , @omjavaid wrote: > Hi @clayborg this rev has caused some lldb-vscode test failures across all > LLDB/Linux buildbots. tracking this down now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread Muhammad Omair Javaid via Phabricator via lldb-commits
omjavaid added a comment. Hi @clayborg this rev has caused some lldb-vscode test failures across all LLDB/Linux buildbots. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119797/new/ https://reviews.llvm.org/D119797

[Lldb-commits] [PATCH] D120101: [lldb] Fix (unintentional) recursion in CommandObjectRegexCommand

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. We also have StringExtractor that we could call StringExtractor::GetU32(...) on. We would need to add a new method like: bool StringExtractor::SkipTo(char ch); And then we could call StringExtractor::GetU32(..) if that returns true. The current string position only

[Lldb-commits] [PATCH] D120101: [lldb] Fix (unintentional) recursion in CommandObjectRegexCommand

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/source/Commands/CommandObjectRegexCommand.cpp:13 +#include + I cringe every time I see an old C header being imported as C++ because of the huge amounts of junk it causes the DWARF to incur with many import dec

[Lldb-commits] [PATCH] D120100: [lldb] Expose eBroadcastBitProgress to the SWIG SBAPI

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. We have been quite stable on our public API over the years which allows people to create native tools that link against our public API and we don't regress it so things always compile or would actually still run against an older LLDB library. In D120100#3331209

[Lldb-commits] [PATCH] D120100: [lldb] Expose eBroadcastBitProgress to the SWIG SBAPI

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. So the progress bits are defined inside the class the broadcasts the events to make ownership clear. And we can not break the public API, so we unfortunately can't do this. We don't change these bits often, so although it is kind of a pain, it should remain as it is fr

[Lldb-commits] [PATCH] D120105: Remove recursive include of GDBRemoteCommunicationServerCommon.h

2022-02-17 Thread Shafik Yaghmour via Phabricator via lldb-commits
shafik created this revision. shafik added reviewers: jingham, aprantl. shafik requested review of this revision. `GDBRemoteCommunicationServerCommon.h` includes itself, removing this include. https://reviews.llvm.org/D120105 Files: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicatio

[Lldb-commits] [PATCH] D120100: [lldb] Expose eBroadcastBitProgress to the SWIG SBAPI

2022-02-17 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment. In D120100#3331141 , @JDevlieghere wrote: > Removing the enum from SBDebugger is an ABI breaking change. I think this has > been in tree for a while, so if we shipped this like this in the last > release, we cannot guarantee that t

[Lldb-commits] [PATCH] D120101: [lldb] Fix (unintentional) recursion in CommandObjectRegexCommand

2022-02-17 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added inline comments. Comment at: lldb/source/Commands/CommandObjectRegexCommand.cpp:38 +// Parse the number following '%'. +const size_t idx = std::atoi(str.c_str() + pos + 1); + mib wrote: > Are we assuming that the number following `%` wi

[Lldb-commits] [PATCH] D120101: [lldb] Fix (unintentional) recursion in CommandObjectRegexCommand

2022-02-17 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 409824. JDevlieghere marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120101/new/ https://reviews.llvm.org/D120101 Files: lldb/source/Commands/CommandObjectRegexCommand.cpp lldb/source/Commands/CommandObjectReg

[Lldb-commits] [PATCH] D120101: [lldb] Fix (unintentional) recursion in CommandObjectRegexCommand

2022-02-17 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added inline comments. Comment at: lldb/source/Commands/CommandObjectRegexCommand.cpp:38 +// Parse the number following '%'. +const size_t idx = std::atoi(str.c_str() + pos + 1); + Are we assuming that the number following `%` will always have a singl

[Lldb-commits] [PATCH] D120100: [lldb] Expose eBroadcastBitProgress to the SWIG SBAPI (NFC)

2022-02-17 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. Removing the enum from SBDebugger is an ABI breaking change. I think this has been in tree for a while, so if we shipped this like this in the last release, we cannot guarantee that this won't break anyone. Can we avoid the issue by defining the interface file? R

[Lldb-commits] [PATCH] D120101: [lldb] Fix (unintentional) recursion in CommandObjectRegexCommand

2022-02-17 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere created this revision. JDevlieghere added reviewers: jingham, clayborg, aprantl, mib. Herald added a subscriber: mgorny. JDevlieghere requested review of this revision. Jim noticed that the regex command is unintentionally recursive: Let's use the following command regex as an exampl

[Lldb-commits] [PATCH] D120100: [lldb] Expose eBroadcastBitProgress to the SWIG SBAPI (NFC)

2022-02-17 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision. mib added reviewers: clayborg, JDevlieghere, jingham. mib added a project: LLDB. mib requested review of this revision. Herald added a subscriber: lldb-commits. This patch removes the multiple definitions of the eBroadcastBitProgress enum in `Debugger` and `SBDebugger` h

[Lldb-commits] [lldb] 08a6229 - [LLDB] Adding skipif for arm linux for TestStructuredBinding.py

2022-02-17 Thread Shafik Yaghmour via lldb-commits
Author: Shafik Yaghmour Date: 2022-02-17T14:30:54-08:00 New Revision: 08a6229e214bd75aed975c610aaff6026c5d2880 URL: https://github.com/llvm/llvm-project/commit/08a6229e214bd75aed975c610aaff6026c5d2880 DIFF: https://github.com/llvm/llvm-project/commit/08a6229e214bd75aed975c610aaff6026c5d2880.dif

[Lldb-commits] [PATCH] D119548: [lldb] Fix race condition between lldb-vscode and stop hooks executor

2022-02-17 Thread Ilya Nozhkin via Phabricator via lldb-commits
ilya-nozhkin added a comment. In D119548#3330226 , @clayborg wrote: > Try out the https://reviews.llvm.org/D119797 patch and see if this fixes this > issue? I have just updated it after responding to comments. Yes, it fixes this particular race. But I t

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. clayborg marked 2 inline comments as done. Closed by commit rG9febd1e573fb: Fix race condition when launching and attaching. (authored by clayborg). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[Lldb-commits] [lldb] 9febd1e - Fix race condition when launching and attaching.

2022-02-17 Thread Greg Clayton via lldb-commits
Author: Greg Clayton Date: 2022-02-17T13:18:49-08:00 New Revision: 9febd1e573fb8b3d1de5844b7bfd33eb998f0106 URL: https://github.com/llvm/llvm-project/commit/9febd1e573fb8b3d1de5844b7bfd33eb998f0106 DIFF: https://github.com/llvm/llvm-project/commit/9febd1e573fb8b3d1de5844b7bfd33eb998f0106.diff

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-17 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added a comment. > It is a little awkward to put it in "image lookup -va" however, and odder to > have it be part of the printing of an Address. It seems more like something > you should ask a function? When you look up a function, using `image lookup -n main`, it

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s:28-29 # CHECK: Variable{{.*}}, name = "x0", {{.*}}, scope = parameter, location = # CHECK-NEXT: [0x, 0x0001): DW_OP_reg5 RDI # CHECK-NEXT: [0x00

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread walter erquinigo via Phabricator via lldb-commits
wallace accepted this revision. wallace added a comment. This revision is now accepted and ready to land. lgtm Comment at: lldb/tools/lldb-vscode/VSCode.cpp:533 + // Wait for the process hit a stopped state. When running a launch (with or + // without "launchCommands") or att

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-17 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added inline comments. Comment at: lldb/test/Shell/SymbolFile/DWARF/x86/debug_loc.s:16 +# CHECK-LABEL: image lookup -v -a 0 -R +# CHECK: Variable: {{.*}}, name = "x0", type = "int", location = DW_OP_reg5 RDI, decl = , valid ranges = +# CHECK: Variable: {{.*}}, name = "x

[Lldb-commits] [lldb] f6d3901 - [LLDB] Fix TestStructuredBinding.py for libstdc++

2022-02-17 Thread Shafik Yaghmour via lldb-commits
Author: Shafik Yaghmour Date: 2022-02-17T11:30:07-08:00 New Revision: f6d390193cbcc3b9a0e900202023bd80bd5ac4a4 URL: https://github.com/llvm/llvm-project/commit/f6d390193cbcc3b9a0e900202023bd80bd5ac4a4 DIFF: https://github.com/llvm/llvm-project/commit/f6d390193cbcc3b9a0e900202023bd80bd5ac4a4.dif

[Lldb-commits] [PATCH] D119178: Add support for generating debug-info for structured bindings of structs and arrays

2022-02-17 Thread Shafik Yaghmour 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 rGf56cb520d855: [DEBUGINFO] [LLDB] Add support for generating debug-info for structured… (authored by shafik). Herald added projects: clang, LLDB. Rep

[Lldb-commits] [PATCH] D119918: [CMake] Rename TARGET_TRIPLE to LLVM_TARGET_TRIPLE

2022-02-17 Thread Diana Picus via Phabricator via lldb-commits
rovka accepted this revision. rovka added a comment. I'm happy if the buildbots are happy :D thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119918/new/ https://reviews.llvm.org/D119918 ___ lldb-co

[Lldb-commits] [lldb] f56cb52 - [DEBUGINFO] [LLDB] Add support for generating debug-info for structured bindings of structs and arrays

2022-02-17 Thread Shafik Yaghmour via lldb-commits
Author: Shafik Yaghmour Date: 2022-02-17T11:14:14-08:00 New Revision: f56cb520d8554ca42a215e82ecfa58d0b6c178e4 URL: https://github.com/llvm/llvm-project/commit/f56cb520d8554ca42a215e82ecfa58d0b6c178e4 DIFF: https://github.com/llvm/llvm-project/commit/f56cb520d8554ca42a215e82ecfa58d0b6c178e4.dif

[Lldb-commits] [PATCH] D119548: [lldb] Fix race condition between lldb-vscode and stop hooks executor

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment. Try out the https://reviews.llvm.org/D119797 patch and see if this fixes this issue? I have just updated it after responding to comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119548/new/ https://reviews.llvm.org/D119548 __

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
clayborg marked 2 inline comments as done. clayborg added a comment. In D119797#3321924 , @labath wrote: > Instead of polling, would it be possible for the event handler thread to send > a notification (through a condition variable, std::future, etc.), a

[Lldb-commits] [PATCH] D111634: [lldb] Print embedded nuls in char arrays (PR44649)

2022-02-17 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment. > An exception to this rule is made for the nul character at the very end of > the string. @labath What do you think of hiding //all// trailing nul characters, not just the final one? For example consider: char buf[16] = "hello world"; # v buf # (char[16]) bu

[Lldb-commits] [PATCH] D119797: Fix race condition when launching and attaching.

2022-02-17 Thread Greg Clayton via Phabricator via lldb-commits
clayborg updated this revision to Diff 409700. clayborg added a comment. - use std::chrono for sleeping the function during polling - we must use polling in VSCode::WaitForProcessToStop since attach doesn't deliver the initial eStateStopped event - ignore any eStateStopped events that have a proc

[Lldb-commits] [PATCH] D119831: [lldb] Add support for a "global" lldbinit file

2022-02-17 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. In D119831#3329959 , @labath wrote: > In D119831#3329894 , @JDevlieghere > wrote: > >> Specifyin

[Lldb-commits] [lldb] ca7f06f - add missing include

2022-02-17 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2022-02-17T09:02:29-08:00 New Revision: ca7f06fcb60ce7730e7768aa3409387e6aa4efaf URL: https://github.com/llvm/llvm-project/commit/ca7f06fcb60ce7730e7768aa3409387e6aa4efaf DIFF: https://github.com/llvm/llvm-project/commit/ca7f06fcb60ce7730e7768aa3409387e6aa4efaf.diff

Re: [Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-17 Thread Jim Ingham via lldb-commits
There was a question on the dev list a while ago about to print out all the valid ranges of a variable. That's a useful bit of info if you're trying to figure out where you could break to actually see or change a variable's value in an optimized function. I think that's the motivation for the

[Lldb-commits] [PATCH] D119831: [lldb] Add support for a "global" lldbinit file

2022-02-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D119831#3329894 , @JDevlieghere wrote: > Specifying a directory instead of a file makes sense. Why omit the leading > dot though? I can think of a few reasons (you can specify a subdir unlike > home, it's probably not somethi

[Lldb-commits] [PATCH] D119831: [lldb] Add support for a "global" lldbinit file

2022-02-17 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D119831#3325798 , @labath wrote: > It's worth noting that (as a part of the consistency), I have changed the > cmake > variable to point to a directory instead of a file. This means that the init > file name is currently

[Lldb-commits] [PATCH] D119548: [lldb] Fix race condition between lldb-vscode and stop hooks executor

2022-02-17 Thread Ilya Nozhkin via Phabricator via lldb-commits
ilya-nozhkin updated this revision to Diff 409655. ilya-nozhkin added a comment. Made requested changes. I agree with @jingham that if the listener is passed via launch info then we don't need to activate it in `CreateProcess`. I mean, activating it in `CreateProcess` was a hack that allowed me

[Lldb-commits] [PATCH] D119963: [LLDB] Dump valid ranges of variables

2022-02-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. I suppose one could ask the question whether this should be printing the entire set range of ranges, or just the one Comment at: lldb/source/Commands/Options.td:960 "target modules.">; + def target_modules_lookup_variables_ranges : Option<"show-va

[Lldb-commits] [PATCH] D119548: [lldb] Fix race condition between lldb-vscode and stop hooks executor

2022-02-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D119548#3327751 , @jingham wrote: > I don't think CreateProcess needs a HijackListener, does it? It doesn't > generate events, it just make the connection to the server. It is always > followed by Launch or DebugProcess, whi