[Lldb-commits] [lldb] [LLDB][test] Update Makefile.rules to support Windows host+Linux target (PR #99266)

2024-08-05 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. This looks fine. Thanks for the reminder. https://github.com/llvm/llvm-project/pull/99266 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-08-05 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,58 @@ +// REQUIRES: system-linux, native clayborg wrote: I added a test with an on disk file https://github.com/llvm/llvm-project/pull/101237 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https:/

[Lldb-commits] [lldb] Make sure that a `Progress` "completed" update is always reported at destruction (PR #102097)

2024-08-05 Thread Greg Clayton via lldb-commits
clayborg wrote: Was this why we saw some Swift progress dialogs hanging around forever? Looks ok to me. @JDevlieghere feel free to add any more reviewers that have been working on progress dialogs. https://github.com/llvm/llvm-project/pull/102097 ___

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-05 Thread Greg Clayton via lldb-commits
@@ -6,20 +6,27 @@ class MyScriptedPlatform(ScriptedPlatform): def __init__(self, exe_ctx, args): -self.processes = {} - -proc = {} -proc["name"] = "a.out" -proc["arch"] = "arm64-apple-macosx" -proc["pid"] = 420 -proc["parent"

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-05 Thread Greg Clayton via lldb-commits
@@ -180,7 +184,19 @@ class CommandObjectPlatformSelect : public CommandObjectParsed { m_interpreter, ArchSpec(), select, error, platform_arch)); if (platform_sp) { GetDebugger().GetPlatformList().SetSelectedPlatform(platform_sp); - + Opti

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-05 Thread Greg Clayton via lldb-commits
@@ -100,6 +99,9 @@ class LLDB_API SBPlatform { SBPlatform(const char *platform_name); + SBPlatform(const char *platform_name, const SBDebugger &debugger, + const char *script_name, const SBStructuredData &dict); + clayborg wrote: is `script_na

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-05 Thread Greg Clayton via lldb-commits
@@ -0,0 +1,108 @@ +""" +Test python scripted platform in lldb +""" + +import os, shutil + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbtest + + +class ScriptedPlatf

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-05 Thread Greg Clayton via lldb-commits
@@ -111,6 +111,7 @@ class SBStructuredData { protected: friend class SBAttachInfo; friend class SBLaunchInfo; + friend class SBPlatform; friend class SBDebugger; friend class SBTarget; friend class SBProcess; clayborg wrote: We keep friending new

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-05 Thread Greg Clayton via lldb-commits
@@ -29,3 +29,15 @@ and executable type. If the architecture or executable type do not match, a suitable platform will be found automatically." ) lldb::SBPlatform; + +%feature("docstring", " +Create a platform instance using a specific platform plugin name, debugger, +script n

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-05 Thread Med Ismail Bennani via lldb-commits
@@ -1003,6 +1010,21 @@ class Platform : public PluginInterface { FileSpec GetModuleCacheRoot(); }; +class PlatformMetadata { +public: + PlatformMetadata(Debugger &debugger, const ScriptedMetadata metadata); + ~PlatformMetadata() = default; + + Debugger &GetDebugger() cons

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Fix bug where default values are not propagated. (PR #101770)

2024-08-05 Thread Greg Clayton via lldb-commits
clayborg wrote: > @hokein Can you share the build command you got to trigger the above msan > error? I'm having trouble reproducing your issue And was your build using msan? or just a regular build? I can see a msan build fail to create a core file due to it crashing, and then you might see th

[Lldb-commits] [lldb] [lldb/Interpreter] Fix ambiguous partial command resolution (PR #101934)

2024-08-05 Thread via lldb-commits
jimingham wrote: > > IIUC, you are adding a new rule that if an incoming command name has > > partial matches to one user command and one alias command, the user command > > is preferred over the alias command. Is that right? > > Yes. > > > You certainly should document that rule somewhere -

[Lldb-commits] [lldb] [lldb] Delete StepScope enum whose values are ignored. (PR #101981)

2024-08-05 Thread via lldb-commits
Matej =?utf-8?q?Košík?= Message-ID: In-Reply-To: github-actions[bot] wrote: @sedymrak Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm

[Lldb-commits] [lldb] [lldb] Delete StepScope enum whose values are ignored. (PR #101981)

2024-08-05 Thread Jonas Devlieghere via lldb-commits
Matej =?utf-8?q?Košík?= Message-ID: In-Reply-To: https://github.com/JDevlieghere closed https://github.com/llvm/llvm-project/pull/101981 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-co

[Lldb-commits] [lldb] 248c534 - [lldb] Delete StepScope enum whose values are ignored. (#101981)

2024-08-05 Thread via lldb-commits
Author: sedymrak Date: 2024-08-05T11:23:57-07:00 New Revision: 248c53429427034f45705af60d47f3b1090c4799 URL: https://github.com/llvm/llvm-project/commit/248c53429427034f45705af60d47f3b1090c4799 DIFF: https://github.com/llvm/llvm-project/commit/248c53429427034f45705af60d47f3b1090c4799.diff LOG:

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-08-05 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman edited https://github.com/llvm/llvm-project/pull/101283 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman closed https://github.com/llvm/llvm-project/pull/101383 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] ddb9869 - [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (#101383)

2024-08-05 Thread via lldb-commits
Author: Dmitry Vasilyev Date: 2024-08-05T22:11:24+04:00 New Revision: ddb9869dd2b5c54fc2369287299e11b9a618d71a URL: https://github.com/llvm/llvm-project/commit/ddb9869dd2b5c54fc2369287299e11b9a618d71a DIFF: https://github.com/llvm/llvm-project/commit/ddb9869dd2b5c54fc2369287299e11b9a618d71a.dif

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: > One possibility here is that if you have the type, then you will have a > template specialization type for the template alias, and that gives you the > template arguments used to specialize the alias. Which should answer this > need. This can probably go, thank you! http

[Lldb-commits] [lldb] New ThreadPlanSingleThreadTimeout to resolve potential deadlock in single thread stepping (PR #90930)

2024-08-05 Thread via lldb-commits
jimingham wrote: Ack, sorry, I missed that you had updated this. My notifications from GitHub are somewhat flakey... I didn't understand why you are checking both "IsLeafPlan" and "MischiefManaged", why does MischiefManaged get to override IsLeafPlan? https://github.com/llvm/llvm-project/pul

[Lldb-commits] [lldb] New ThreadPlanSingleThreadTimeout to resolve potential deadlock in single thread stepping (PR #90930)

2024-08-05 Thread via lldb-commits
@@ -813,12 +819,17 @@ bool Thread::ShouldStop(Event *event_ptr) { // decide whether they still need to do more work. bool done_processing_current_plan = false; - if (!current_plan->PlanExplainsStop(event_ptr)) { if (current_plan->TracerExplainsStop()) { done

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Matheus Izvekov via lldb-commits
mizvekov wrote: One possibility here is that if you have the type, then you will have a template specialization type for the template alias, and that gives you the template arguments used to specialize the alias. Which should answer this need. But of course, if you have a lossy semantic adjust

[Lldb-commits] [lldb] New ThreadPlanSingleThreadTimeout to resolve potential deadlock in single thread stepping (PR #90930)

2024-08-05 Thread via lldb-commits
@@ -395,6 +396,11 @@ class ThreadPlan : public std::enable_shared_from_this, bool IsControllingPlan() { return m_is_controlling_plan; } + // Returns true if this plan is a leaf plan, meaning the plan will be popped jimingham wrote: Leaf plans are only au

[Lldb-commits] [clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-08-05 Thread Helena Kotas via lldb-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/97362 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/Interpreter] Fix ambiguous partial command resolution (PR #101934)

2024-08-05 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: > This is for this sort of lookup: > > ``` > (lldb) reg read pc > ``` > > Right? As opposed to tab completion. Right, tab completion already can suggest multiple candidates, so that worked already. > This needs a test case or at least a clear example as a comment in the c

[Lldb-commits] [lldb] [lldb/Target] Rename ThreadPlanPython into ScriptedThreadPlan (PR #101931)

2024-08-05 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben closed https://github.com/llvm/llvm-project/pull/101931 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 039cfe8 - [lldb/Target] Rename ThreadPlanPython into ScriptedThreadPlan (#101931)

2024-08-05 Thread via lldb-commits
Author: Med Ismail Bennani Date: 2024-08-05T10:43:42-07:00 New Revision: 039cfe812c15c8f9e52ddb8cfc183fd8c927dba5 URL: https://github.com/llvm/llvm-project/commit/039cfe812c15c8f9e52ddb8cfc183fd8c927dba5 DIFF: https://github.com/llvm/llvm-project/commit/039cfe812c15c8f9e52ddb8cfc183fd8c927dba5.

[Lldb-commits] [lldb] [lldb/Target] Rename ThreadPlanPython into ScriptedThreadPlan (PR #101931)

2024-08-05 Thread via lldb-commits
https://github.com/jimingham approved this pull request. Makes sense, none of this is Python specific so the name is not appropriate. https://github.com/llvm/llvm-project/pull/101931 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lis

[Lldb-commits] [lldb] [lldb/Interpreter] Fix ambiguous partial command resolution (PR #101934)

2024-08-05 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: > IIUC, you are adding a new rule that if an incoming command name has partial > matches to one user command and one alias command, the user command is > preferred over the alias command. Is that right? Yes. > You certainly should document that rule somewhere - maybe in th

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Matheus Izvekov via lldb-commits
mizvekov wrote: The basic premise here was implemented back in D134604, and this has been for a few years applied in some cases, like substitution of default arguments. We leave a Subst* node behind with the purpose of somewhere down the line changing it back to what the user wrote. So we do

[Lldb-commits] [lldb] [lldb/Interpreter] Fix ambiguous partial command resolution (PR #101934)

2024-08-05 Thread via lldb-commits
jimingham wrote: IIUC, you are adding a new rule that if an incoming command name has partial matches to one user command and one alias command, the user command is preferred over the alias command. Is that right? You certainly should document that rule somewhere - maybe in the Tutorial sect

[Lldb-commits] [lldb] Revert "[LLDB][SBSaveCore] Implement a selectable threadlist for Core… (PR #102018)

2024-08-05 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 72c9e24ed92149e853fc215cdf07e3afe34ae146 c2eb655327120d794c49a21908c5c664f3283f92 --e

[Lldb-commits] [lldb] Revert "[LLDB][SBSaveCore] Implement a selectable threadlist for Core… (PR #102018)

2024-08-05 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond closed https://github.com/llvm/llvm-project/pull/102018 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] accf5c9 - Revert "[LLDB][SBSaveCore] Implement a selectable threadlist for Core… (#102018)

2024-08-05 Thread via lldb-commits
Author: Jacob Lalonde Date: 2024-08-05T10:17:25-07:00 New Revision: accf5c9bb3b5fe88628a44062a5c0c2f903fca2c URL: https://github.com/llvm/llvm-project/commit/accf5c9bb3b5fe88628a44062a5c0c2f903fca2c DIFF: https://github.com/llvm/llvm-project/commit/accf5c9bb3b5fe88628a44062a5c0c2f903fca2c.diff

[Lldb-commits] [lldb] Revert "[LLDB][SBSaveCore] Implement a selectable threadlist for Core… (PR #102018)

2024-08-05 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Jacob Lalonde (Jlalond) Changes … Options. (#100443)" This reverts commit 3e4af616334eae532f308605b89ff158dd195180. @adrian-prantl FYI Reverts #100443 --- Patch is 40.32 KiB, truncated to 20.00 KiB below, full version: https://github.

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #101778)

2024-08-05 Thread Adrian Prantl via lldb-commits
@@ -561,7 +562,85 @@ static void SetupLangOpts(CompilerInstance &compiler, lang_opts.NoBuiltin = true; } -static void SetupImportStdModuleLangOpts(CompilerInstance &compiler) { +// NOTE: should be kept in sync with sdkSupportsBuiltinModules in +// Toolchains/Darwin.cpp +stat

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #101778)

2024-08-05 Thread Adrian Prantl via lldb-commits
@@ -578,7 +657,12 @@ static void SetupImportStdModuleLangOpts(CompilerInstance &compiler) { lang_opts.GNUMode = true; lang_opts.GNUKeywords = true; lang_opts.CPlusPlus11 = true; - lang_opts.BuiltinHeadersInSystemModules = true; + + // FIXME: We should use the driver to

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #101778)

2024-08-05 Thread Adrian Prantl via lldb-commits
@@ -561,7 +562,85 @@ static void SetupLangOpts(CompilerInstance &compiler, lang_opts.NoBuiltin = true; } -static void SetupImportStdModuleLangOpts(CompilerInstance &compiler) { +// NOTE: should be kept in sync with sdkSupportsBuiltinModules in +// Toolchains/Darwin.cpp +stat

[Lldb-commits] [lldb] Revert "[LLDB][SBSaveCore] Implement a selectable threadlist for Core… (PR #102018)

2024-08-05 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond created https://github.com/llvm/llvm-project/pull/102018 … Options. (#100443)" This reverts commit 3e4af616334eae532f308605b89ff158dd195180. @adrian-prantl FYI Reverts #100443 >From c2eb655327120d794c49a21908c5c664f3283f92 Mon Sep 17 00:00:00 2001 From: Jacob Lalo

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-08-05 Thread Jacob Lalonde via lldb-commits
Jlalond wrote: > I see you ended up not using the fallible_iterator thing in the end. I'm sort > of ok with that, though I think it'd be better to do it that way, as we > wouldn't need the upfront array bounds check and we could return partial data > where it made sense, @labath for this I ne

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: No, IWYU has some complex logic to figure out which type components the type alias author intends to provide, and which should be `#include`d at the use site. Of course, substituted template type arguments are the user responsibility, not the alias author's one, hence this i

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-08-05 Thread Jacob Lalonde via lldb-commits
@@ -373,7 +373,6 @@ void yaml::MappingContextTraits::mapping( void yaml::MappingContextTraits::mapping( IO &IO, MemoryDescriptor_64 &Memory, BinaryRef &Content) { mapRequiredHex(IO, "Start of Memory Range", Memory.StartOfMemoryRange); - mapRequiredHex(IO, "Data Size", Me

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-08-05 Thread Jacob Lalonde via lldb-commits
@@ -336,3 +336,52 @@ TEST(MinidumpYAML, ExceptionStream_ExtraParameter) { 0xab, 0xad, 0xca, 0xfe}), *ExpectedContext); } + +TEST(MinidumpYAML, MemoryRegion_64bit) { + SmallString<0> Storage; + auto ExpectedFile = toBinary(Storage, R"

[Lldb-commits] [lldb] [lldb] Delete StepScope enum whose values are ignored. (PR #101981)

2024-08-05 Thread via lldb-commits
Matej =?utf-8?q?Košík?= Message-ID: In-Reply-To: https://github.com/sedymrak updated https://github.com/llvm/llvm-project/pull/101981 >From 8abb0771e646dfc46d832f03485b288a4be08168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= Date: Mon, 5 Aug 2024 13:47:02 +0200 Subject

[Lldb-commits] [lldb] [lldb][ClangExpressionParser] Set BuiltinHeadersInSystemModules depending on SDK version (PR #101778)

2024-08-05 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/101778 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/Interpreter] Fix ambiguous partial command resolution (PR #101934)

2024-08-05 Thread Med Ismail Bennani via lldb-commits
@@ -1302,6 +1298,36 @@ CommandObject *CommandInterpreter::GetUserCommandObject( return {}; } +CommandObject *CommandInterpreter::GetAliasCommandObject( +llvm::StringRef cmd, StringList *matches, StringList *descriptions) const { + std::string cmd_str(cmd); + auto find_

[Lldb-commits] [lldb] [lldb] Rename `scripting template` to `scripting extension` (NFC) (PR #101935)

2024-08-05 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben closed https://github.com/llvm/llvm-project/pull/101935 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 5689ccc - [lldb] Rename `scripting template` to `scripting extension` (NFC) (#101935)

2024-08-05 Thread via lldb-commits
Author: Med Ismail Bennani Date: 2024-08-05T09:35:27-07:00 New Revision: 5689cccead7b70d8eeae4c641e8078e6d3c50b9a URL: https://github.com/llvm/llvm-project/commit/5689cccead7b70d8eeae4c641e8078e6d3c50b9a DIFF: https://github.com/llvm/llvm-project/commit/5689cccead7b70d8eeae4c641e8078e6d3c50b9a.

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Fix bug where default values are not propagated. (PR #101770)

2024-08-05 Thread Jacob Lalonde via lldb-commits
Jlalond wrote: @hokein Thank you for reverting it, I'll look into what I missed :) https://github.com/llvm/llvm-project/pull/101770 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Delete StepScope enum whose values are ignored. (PR #101981)

2024-08-05 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 9fea73110ecc0a13d18e5c52f8e7fa62a9de9ee9 8abb0771e646dfc46d832f03485b288a4be08168 --e

[Lldb-commits] [lldb] [lldb] Rename `scripting template` to `scripting extension` (NFC) (PR #101935)

2024-08-05 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. https://github.com/llvm/llvm-project/pull/101935 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Delete StepScope enum whose values are ignored. (PR #101981)

2024-08-05 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. LGTM, this looks completely unused. https://github.com/llvm/llvm-project/pull/101981 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[Lldb-commits] [lldb] [LLDB][test] Update Makefile.rules to support Windows host+Linux target (PR #99266)

2024-08-05 Thread Vladislav Dzhidzhoev via lldb-commits
dzhidzhoev wrote: @labath are there any comments from you that haven't been resolved yet? I feel that I may be missing something, but I don't see exactly what. https://github.com/llvm/llvm-project/pull/99266 ___ lldb-commits mailing list lldb-commits@

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman updated https://github.com/llvm/llvm-project/pull/101383 >From 14a653c244ea36233de288ebe67a9f42adaacfc5 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilyev Date: Wed, 31 Jul 2024 22:02:53 +0400 Subject: [PATCH 1/3] [lldb] Added Pipe::WriteWithTimeout() Fixed few bugs in

[Lldb-commits] [lldb] [lldb] Rename `scripting template` to `scripting extension` (NFC) (PR #101935)

2024-08-05 Thread via lldb-commits
https://github.com/jimingham approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/101935 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Matheus Izvekov via lldb-commits
mizvekov wrote: > @mizvekov, do you have any idea how to get back the lost > `SubstTemplateTypeParmType`? It plays an important role in the IWYU tool > analysis. Thanks! So from my undertstanding, IWYU only needs the SubstTemplateTypeParmType for resugaring purposes, in order to recover the t

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-05 Thread Andrey Ali Khan Bolshakov via lldb-commits
bolshakov-a wrote: When instantiating such an alias: ```cpp template using Identity = T; ``` before the patch: ``` TemplateSpecializationType 0x676f0a60 'Identity' sugar alias |-name: 'Identity' qualified | `-TypeAliasTemplateDecl 0x676c91d8 Identity |-TemplateArgument type 'IndirectCla

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches (PR #99305)

2024-08-05 Thread Pavel Labath via lldb-commits
labath wrote: Superseeded by #101333 https://github.com/llvm/llvm-project/pull/99305 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches (PR #99305)

2024-08-05 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/99305 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Tolerate multiple compile units with the same DWO ID (PR #100577)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -97,12 +97,14 @@ void DWARFUnit::ExtractUnitDIEIfNeeded() { *m_dwo_id, m_first_die.GetOffset())); return; // Can't fetch the compile unit from the dwo file. } - // If the skeleton compile unit gets its unit DIE parsed first, then this - // will fill in the DW

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-08-05 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/101333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 212950f - [lldb] Refactor TypeQuery::ContextMatches, take 2 (#101333)

2024-08-05 Thread via lldb-commits
Author: Pavel Labath Date: 2024-08-05T17:06:07+02:00 New Revision: 212950fbcec3b71fa15ee49e0539333a30159c32 URL: https://github.com/llvm/llvm-project/commit/212950fbcec3b71fa15ee49e0539333a30159c32 DIFF: https://github.com/llvm/llvm-project/commit/212950fbcec3b71fa15ee49e0539333a30159c32.diff

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -873,33 +873,29 @@ Address ObjectFileELF::GetImageInfoAddress(Target *target) { if (!section_list) return Address(); - // Find the SHT_DYNAMIC (.dynamic) section. - SectionSP dynsym_section_sp( - section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo,

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -873,33 +873,29 @@ Address ObjectFileELF::GetImageInfoAddress(Target *target) { if (!section_list) return Address(); - // Find the SHT_DYNAMIC (.dynamic) section. - SectionSP dynsym_section_sp( - section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo,

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -384,6 +392,9 @@ class ObjectFileELF : public lldb_private::ObjectFile { /// ELF dependent module dump routine. void DumpDependentModules(lldb_private::Stream *s); + /// ELF dump the .dynamic section + void DumpELFDynamic(lldb_private::Stream *s); lab

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -873,33 +873,29 @@ Address ObjectFileELF::GetImageInfoAddress(Target *target) { if (!section_list) return Address(); - // Find the SHT_DYNAMIC (.dynamic) section. - SectionSP dynsym_section_sp( - section_list->FindSectionByType(eSectionTypeELFDynamicLinkInfo,

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,58 @@ +// REQUIRES: system-linux, native labath wrote: If it was a lot of work then sure, I'd agree with you -- but I don't think that's the case here. I just gave it a shot, and this is the only change I needed to make on top of your patch to be abl

[Lldb-commits] [lldb] [lldb] Change lldb's breakpoint handling behavior (PR #96260)

2024-08-05 Thread David Spickett via lldb-commits
DavidSpickett wrote: I reduced `lldb/test/API/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py` a bit to the point where it stalls, which is when it tries to step over from breakpoint 2 to 3 in `test_step_over`: ``` int b = func(); // breakpoint_2 a = b + func(

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman updated https://github.com/llvm/llvm-project/pull/101383 >From 14a653c244ea36233de288ebe67a9f42adaacfc5 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilyev Date: Wed, 31 Jul 2024 22:02:53 +0400 Subject: [PATCH 1/3] [lldb] Added Pipe::WriteWithTimeout() Fixed few bugs in

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-08-05 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: @labath >That's nice, but I think we should figure out how to reduce the number of >ifdefs in this patch. Porting linux away from fork may not be your concern, >but figuring out how to make the code less branchy is. If you can do that >without removing forks, I can take it upo

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -2550,6 +2550,21 @@ ModuleSP Process::ReadModuleFromMemory(const FileSpec &file_spec, } ModuleSP module_sp(new Module(file_spec, ArchSpec())); if (module_sp) { +if (size_to_read == 0) { + // Default to 8192 in case we can't find a memory region. + size_t

[Lldb-commits] [lldb] [lldb] Delete StepScope enum whose values are ignored. (PR #101981)

2024-08-05 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (sedymrak) Changes StepScope enum is a type whose values are passed around, but they are ultimately ignored. --- Full diff: https://github.com/llvm/llvm-project/pull/101981.diff 1 Files Affected: - (modified) lldb/source/Commands/C

[Lldb-commits] [lldb] [lldb] Delete StepScope enum whose values are ignored. (PR #101981)

2024-08-05 Thread via lldb-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[Lldb-commits] [lldb] [lldb] Delete StepScope enum whose values are ignored. (PR #101981)

2024-08-05 Thread via lldb-commits
https://github.com/sedymrak created https://github.com/llvm/llvm-project/pull/101981 StepScope enum is a type whose values are passed around, but they are ultimately ignored. >From 8abb0771e646dfc46d832f03485b288a4be08168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ko=C5=A1=C3=ADk?= Date

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #101237)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -402,6 +413,29 @@ class ObjectFileELF : public lldb_private::ObjectFile { /// .gnu_debugdata section or \c nullptr if an error occured or if there's no /// section with that name. std::shared_ptr GetGnuDebugDataObjectFile(); + + /// Get the bytes that represent the .d

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -47,5 +50,92 @@ TEST_F(PipeTest, OpenAsReader) { ASSERT_THAT_ERROR( pipe.OpenAsReader(name_ref, /*child_process_inherit=*/false).ToError(), llvm::Succeeded()); + + ASSERT_TRUE(pipe.CanRead()); } #endif + +TEST_F(PipeTest, WriteWithTimeout) { + Pipe pipe; +

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -47,5 +50,92 @@ TEST_F(PipeTest, OpenAsReader) { ASSERT_THAT_ERROR( pipe.OpenAsReader(name_ref, /*child_process_inherit=*/false).ToError(), llvm::Succeeded()); + + ASSERT_TRUE(pipe.CanRead()); } #endif + +TEST_F(PipeTest, WriteWithTimeout) { + Pipe pipe; +

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -47,5 +50,92 @@ TEST_F(PipeTest, OpenAsReader) { ASSERT_THAT_ERROR( pipe.OpenAsReader(name_ref, /*child_process_inherit=*/false).ToError(), llvm::Succeeded()); + + ASSERT_TRUE(pipe.CanRead()); } #endif + +TEST_F(PipeTest, WriteWithTimeout) { + Pipe pipe; +

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -47,5 +50,92 @@ TEST_F(PipeTest, OpenAsReader) { ASSERT_THAT_ERROR( pipe.OpenAsReader(name_ref, /*child_process_inherit=*/false).ToError(), llvm::Succeeded()); + + ASSERT_TRUE(pipe.CanRead()); } #endif + +TEST_F(PipeTest, WriteWithTimeout) { + Pipe pipe; +

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Thanks. Looks good, just a couple of random improvements. https://github.com/llvm/llvm-project/pull/101383 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -47,5 +50,92 @@ TEST_F(PipeTest, OpenAsReader) { ASSERT_THAT_ERROR( pipe.OpenAsReader(name_ref, /*child_process_inherit=*/false).ToError(), llvm::Succeeded()); + + ASSERT_TRUE(pipe.CanRead()); } #endif + +TEST_F(PipeTest, WriteWithTimeout) { + Pipe pipe; +

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -47,5 +50,92 @@ TEST_F(PipeTest, OpenAsReader) { ASSERT_THAT_ERROR( pipe.OpenAsReader(name_ref, /*child_process_inherit=*/false).ToError(), llvm::Succeeded()); + + ASSERT_TRUE(pipe.CanRead()); } #endif + +TEST_F(PipeTest, WriteWithTimeout) { + Pipe pipe; +

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/101383 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: @labath Thanks for the review. I have updated everything. https://github.com/llvm/llvm-project/pull/101383 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman updated https://github.com/llvm/llvm-project/pull/101383 >From 14a653c244ea36233de288ebe67a9f42adaacfc5 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilyev Date: Wed, 31 Jul 2024 22:02:53 +0400 Subject: [PATCH 1/2] [lldb] Added Pipe::WriteWithTimeout() Fixed few bugs in

[Lldb-commits] [lldb] [lldb] Updated lldb-server to spawn the child process and share socket on Windows (PR #101283)

2024-08-05 Thread Pavel Labath via lldb-commits
labath wrote: > @labath > > > This is where I'll have to disagree with you. The exec following the fork > > is not "redundant" on linux. A naked fork is an extremely dangerous thing > > in todays (multithreaded) applications. I'm absolutely certain that the > > improper use of fork with threa

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -44,8 +42,70 @@ TEST_F(PipeTest, OpenAsReader) { size_t name_len = name.size(); name += "foobar"; llvm::StringRef name_ref(name.data(), name_len); + // Note OpenAsReader() do nothing on Windows, the pipe is already opened for + // read and write. ASSERT_THAT_ERROR

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-08-05 Thread Pavel Labath via lldb-commits
labath wrote: > Just applied this patch to the Swift plugin and the tests passed without much > additional work. > > I just had to add a `SetIgnoreModules` API. We don't necessarily have to have > that upstream. But it would be nice. I can add that here. Thanks for checking it out. https://

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -153,19 +127,36 @@ void TypeQuery::SetLanguages(LanguageSet languages) { bool TypeQuery::ContextMatches( llvm::ArrayRef context_chain) const { - if (GetExactMatch() || context_chain.size() == m_context.size()) -return ::contextMatches(context_chain, m_context); +

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -153,19 +127,36 @@ void TypeQuery::SetLanguages(LanguageSet languages) { bool TypeQuery::ContextMatches( llvm::ArrayRef context_chain) const { - if (GetExactMatch() || context_chain.size() == m_context.size()) -return ::contextMatches(context_chain, m_context); +

[Lldb-commits] [lldb] [lldb] Refactor TypeQuery::ContextMatches, take 2 (PR #101333)

2024-08-05 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/101333 >From e87b2b24cd673584aabd00eaf6ad8fc4c0c52c98 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 16 Jul 2024 14:18:27 + Subject: [PATCH 1/3] [lldb] Refactor TypeQuery::ContextMatches, take 2 This is an

[Lldb-commits] [lldb] [lldb] Fixed PipeWindows bugs; added Pipe::WriteWithTimeout() (PR #101383)

2024-08-05 Thread Dmitry Vasilyev via lldb-commits
@@ -44,8 +42,70 @@ TEST_F(PipeTest, OpenAsReader) { size_t name_len = name.size(); name += "foobar"; llvm::StringRef name_ref(name.data(), name_len); + // Note OpenAsReader() do nothing on Windows, the pipe is already opened for + // read and write. ASSERT_THAT_ERROR

[Lldb-commits] [lldb] [lldb] Change lldb's breakpoint handling behavior (PR #96260)

2024-08-05 Thread Pavel Labath via lldb-commits
labath wrote: > I'll apply this PR locally and see what I get. I think that would be definitely appreciated, but I'll just note that this isn't necessary to answer my question, since the patch doesn't contain any changes to lldb-server. (My question basically was: what is the stop-reply packe

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData JSON Array parsing (PR #101929)

2024-08-05 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/101929 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData JSON Array parsing (PR #101929)

2024-08-05 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: How is the operator bool change related to this change? AFAICT, the pimpl pointer should always be valid. https://github.com/llvm/llvm-project/pull/101929 ___ lldb-commits mailing list lldb-commits@lists.llvm.org h

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData JSON Array parsing (PR #101929)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -110,6 +110,23 @@ class MyRandomClass: self.assertTrue(my_random_class) self.assertEqual(my_random_class.payload, MyRandomClass.payload) +example_arr = [1, 2.3, "4", {"5": False}] +arr_str = json.dumps(example_arr) +s.Clear() +

[Lldb-commits] [lldb] [lldb/API] Fix SBStructuredData JSON Array parsing (PR #101929)

2024-08-05 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/101929 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -180,7 +184,19 @@ class CommandObjectPlatformSelect : public CommandObjectParsed { m_interpreter, ArchSpec(), select, error, platform_arch)); if (platform_sp) { GetDebugger().GetPlatformList().SetSelectedPlatform(platform_sp); - + Opti

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -1003,6 +1010,21 @@ class Platform : public PluginInterface { FileSpec GetModuleCacheRoot(); }; +class PlatformMetadata { +public: + PlatformMetadata(Debugger &debugger, const ScriptedMetadata metadata); + ~PlatformMetadata() = default; + + Debugger &GetDebugger() cons

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-08-05 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,108 @@ +""" +Test python scripted platform in lldb +""" + +import os, shutil + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil +from lldbsuite.test import lldbtest + + +class ScriptedPlatf

  1   2   >