[Lldb-commits] [lldb] [lldb] Include api-level.h header for Android (PR #124383)

2025-01-24 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Brad Smith (brad0) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/124383.diff 1 Files Affected: - (modified) lldb/source/Host/posix/HostInfoPosix.cpp (+4) ``diff diff --git a/lldb/source/Host/posix/HostInfoP

[Lldb-commits] [lldb] [lldb] Include api-level.h header for Android (PR #124383)

2025-01-24 Thread Brad Smith via lldb-commits
brad0 wrote: >From the look of the rest of the codebase I should have included this header >when utilizing __ANDROID_API__. https://github.com/llvm/llvm-project/pull/124383 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.o

[Lldb-commits] [lldb] [lldb] Include api-level.h header for Android (PR #124383)

2025-01-24 Thread Brad Smith via lldb-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/124383 None >From b0580b8b0f1f50e5fa10d2b872c79b4942faf093 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Fri, 24 Jan 2025 21:38:07 -0500 Subject: [PATCH] [lldb] Include api-level.h header for Android --- lldb/source

[Lldb-commits] [lldb] [lldb-dap] Implement `runInTerminal` for Windows (PR #121269)

2025-01-24 Thread Hu Jialun via lldb-commits
SuibianP wrote: I [enabled `runInTerminal` tests for Windows](https://github.com/llvm/llvm-project/pull/121269/files#diff-38cf10e0a83515e5c6acf5449a3f5de1d63f116d932a32ba169b746826ead1d4) (will fix line 93 later) except for the 4 launcher tests that requires `os.mkfifo` (https://github.com/pyt

[Lldb-commits] [lldb] [LLDB] Reapply #123873 SBSaveCore Docstrings (PR #124355)

2025-01-24 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond closed https://github.com/llvm/llvm-project/pull/124355 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] e2005d1 - [LLDB] Reapply #123873 SBSaveCore Docstrings (#124355)

2025-01-24 Thread via lldb-commits
Author: Jacob Lalonde Date: 2025-01-24T14:59:56-08:00 New Revision: e2005d1461942539f7533a518aa78017074f6bf9 URL: https://github.com/llvm/llvm-project/commit/e2005d1461942539f7533a518aa78017074f6bf9 DIFF: https://github.com/llvm/llvm-project/commit/e2005d1461942539f7533a518aa78017074f6bf9.diff

[Lldb-commits] [lldb] [LLDB] Reapply #123873 SBSaveCore Docstrings (PR #124355)

2025-01-24 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. https://github.com/llvm/llvm-project/pull/124355 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Reapply #123873 SBSaveCore Docstrings (PR #124355)

2025-01-24 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond edited https://github.com/llvm/llvm-project/pull/124355 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Sbsavecore doc strings reapply (PR #124355)

2025-01-24 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Jacob Lalonde (Jlalond) Changes In my last attempt at this (#123873), I didn't realize we needed semi colons! Also fixed the bug that the feature summary didn't have a type defined. CC @JDevlieghere hope you get a laugh at needing to rever

[Lldb-commits] [lldb] Sbsavecore doc strings reapply (PR #124355)

2025-01-24 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond created https://github.com/llvm/llvm-project/pull/124355 In my last attempt at this (#123873), I didn't realize we needed semi colons! Also fixed the bug that the feature summary didn't have a type defined. CC @JDevlieghere hope you get a laugh at needing to revert d

[Lldb-commits] [lldb] [lldb][TypeSystem] Ensure that ParmVarDecls have the correct DeclContext (PR #124279)

2025-01-24 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/124279 >From 23c7f4a3e067739a050964b3f1c2140787b0c31f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 24 Jan 2025 13:33:07 + Subject: [PATCH 1/4] [lldb][TypeSystem] Ensure that ParmVarDecls have the corr

[Lldb-commits] [lldb] [lldb][Formatters] Do not recursively dereference pointer type when creating formatter candicates list. (PR #124048)

2025-01-24 Thread via lldb-commits
jimingham wrote: I think that argument has some force for synthetic child providers, but less so for summaries. I'd like to see the size of a std::vector regardless of whether I'm holding it as a *, **, etc. https://github.com/llvm/llvm-project/pull/124048

[Lldb-commits] [lldb] 7293455 - [lldb] Add SBThread.selected_frame property (#123981)

2025-01-24 Thread via lldb-commits
Author: Dave Lee Date: 2025-01-24T10:02:15-08:00 New Revision: 7293455cf292cfaa263ea04fc1bc2aee4ceab6a6 URL: https://github.com/llvm/llvm-project/commit/7293455cf292cfaa263ea04fc1bc2aee4ceab6a6 DIFF: https://github.com/llvm/llvm-project/commit/7293455cf292cfaa263ea04fc1bc2aee4ceab6a6.diff LOG:

[Lldb-commits] [lldb] [lldb] Add SBThread.selected_frame property (PR #123981)

2025-01-24 Thread LLVM Continuous Integration via lldb-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-win` running on `as-builder-10` while building `lldb` at step 17 "test-check-lldb-api". Full details are available at: https://lab.llvm.org/buildbot/#/builders/197/builds/ Here is the relevant piece of

[Lldb-commits] [lldb] [lldb] Remove support and workarounds for Android 4 and older (PR #124047)

2025-01-24 Thread Emre Kultursay via lldb-commits
emrekultursay wrote: On the Android Studio side, we don't run tests on old API levels. We only run automated on latest API levels (and some best-effort manual tests on recent-ish API levels). Different features in Android Studio have different min-API requirements. To me, it seems OK to add "A

[Lldb-commits] [lldb] [lldb] Add SBThread.selected_frame property (PR #123981)

2025-01-24 Thread LLVM Continuous Integration via lldb-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-ubuntu` running on `as-builder-9` while building `lldb` at step 16 "test-check-lldb-api". Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/3971 Here is the relevant piece

[Lldb-commits] [lldb] [lldb] Remove support and workarounds for Android 4 and older (PR #124047)

2025-01-24 Thread via lldb-commits
enh-google wrote: > > that's especially weird because execve() doesn't use $PATH ... it's the > > members of the exec family that have a 'p' in the name that do. > > It's been a long time, but I'm pretty sure this was due to a test which ran > something with an empty environment (some of our t

[Lldb-commits] [lldb] [lldb] Add SBThread.selected_frame property (PR #123981)

2025-01-24 Thread Dave Lee via lldb-commits
https://github.com/kastiglione closed https://github.com/llvm/llvm-project/pull/123981 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] cccb554 - [lldb] Remove unused posix_openpt function definition for Android (#124257)

2025-01-24 Thread via lldb-commits
Author: Brad Smith Date: 2025-01-24T11:33:05-05:00 New Revision: cccb55491223cd410cb2f83973377dd75757cb60 URL: https://github.com/llvm/llvm-project/commit/cccb55491223cd410cb2f83973377dd75757cb60 DIFF: https://github.com/llvm/llvm-project/commit/cccb55491223cd410cb2f83973377dd75757cb60.diff LO

[Lldb-commits] [lldb] [lldb] Remove unused posix_openpt function definition for Android (PR #124257)

2025-01-24 Thread Brad Smith via lldb-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/124257 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystem] Ensure that ParmVarDecls have the correct DeclContext (PR #124279)

2025-01-24 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/124279 >From 23c7f4a3e067739a050964b3f1c2140787b0c31f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 24 Jan 2025 13:33:07 + Subject: [PATCH 1/3] [lldb][TypeSystem] Ensure that ParmVarDecls have the corr

[Lldb-commits] [lldb] [lldb][TypeSystem] Ensure that ParmVarDecls have the correct DeclContext (PR #124279)

2025-01-24 Thread Michael Buch via lldb-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/124279 >From 23c7f4a3e067739a050964b3f1c2140787b0c31f Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 24 Jan 2025 13:33:07 + Subject: [PATCH 1/2] [lldb][TypeSystem] Ensure that ParmVarDecls have the corr

[Lldb-commits] [lldb] [lldb][AArch64] Add register fields for Guarded Control Stack registers (PR #124295)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/124295 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AArch64] Add register fields for Guarded Control Stack registers (PR #124295)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/124295 >From 951a38910e49f3e93dc6c9a084e955ab01ad4c49 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Fri, 9 Aug 2024 11:56:29 +0100 Subject: [PATCH 1/6] [lldb][AArch64] Add Guarded Control Stack registers T

[Lldb-commits] [lldb] [lldb][AArch64] Add register fields for Guarded Control Stack registers (PR #124295)

2025-01-24 Thread David Spickett via lldb-commits
DavidSpickett wrote: This is the last piece of functionality for GCS. Remaining is the documentation (https://github.com/llvm/llvm-project/pull/117860) and a release note that I'll push directly if the 20 branch hasn't happened yet by that time. https://github.com/llvm/llvm-project/pull/12429

[Lldb-commits] [lldb] [lldb][AArch64] Add register fields for Guarded Control Stack registers (PR #124295)

2025-01-24 Thread David Spickett via lldb-commits
DavidSpickett wrote: All commits before the one named the same as this PR are from https://github.com/llvm/llvm-project/pull/124293. I will handle the rebasing and conflicts as that gets landed. https://github.com/llvm/llvm-project/pull/124295 ___ ll

[Lldb-commits] [lldb] [lldb][AArch64] Add register fields for Guarded Control Stack registers (PR #124295)

2025-01-24 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: David Spickett (DavidSpickett) Changes The features and locked registers hold the same bits, the latter is a lock for the former. Tested with core files and live processes. I thought about setting a non-zero lock register in the core file,

[Lldb-commits] [lldb] [lldb][AArch64] Add register fields for Guarded Control Stack registers (PR #124295)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/124295 The features and locked registers hold the same bits, the latter is a lock for the former. Tested with core files and live processes. I thought about setting a non-zero lock register in the core file, howe

[Lldb-commits] [lldb] [lldb][TypeSystem] Ensure that ParmVarDecls have the correct DeclContext (PR #124279)

2025-01-24 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/124279 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystem] Ensure that ParmVarDecls have the correct DeclContext (PR #124279)

2025-01-24 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/124279 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack support for Linux core files (PR #124293)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/124293 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystem] Ensure that ParmVarDecls have the correct DeclContext (PR #124279)

2025-01-24 Thread Michael Buch via lldb-commits
Michael137 wrote: Hmm one important difference here is that we would now not attach a name to the parameters that we create for free functions (we already don't do it for methods). I don't think having a name on the parameter is important for anything other than diagnostics of the expression e

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack support for Linux core files (PR #124293)

2025-01-24 Thread David Spickett via lldb-commits
DavidSpickett wrote: Only the latest commit is new, the rest is from https://github.com/llvm/llvm-project/pull/123918. I will rebase and fix conflicts as and when these get landed. https://github.com/llvm/llvm-project/pull/124293 ___ lldb-commits mai

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack support for Linux core files (PR #124293)

2025-01-24 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: David Spickett (DavidSpickett) Changes This allows you to read the same registers as you would for a live process. As the content of proc/pid/smaps is not included in the core file, we don't get the "ss" marker. The GCS region is stil in th

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack support for Linux core files (PR #124293)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/124293 This allows you to read the same registers as you would for a live process. As the content of proc/pid/smaps is not included in the core file, we don't get the "ss" marker. The GCS region is stil in the li

[Lldb-commits] [lldb] [llvm] [NFC][DebugInfo] Make some block-start-position methods return iterators (PR #124287)

2025-01-24 Thread Jeremy Morse via lldb-commits
https://github.com/jmorse created https://github.com/llvm/llvm-project/pull/124287 As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. A number of these (such as getFirstNonPHIOrDbg) are sufficiently infreq

[Lldb-commits] [lldb] [llvm] [NFC][DebugInfo] Make some block-start-position methods return iterators (PR #124287)

2025-01-24 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 c546b5317c518987a5f45dd4c4d25321a955c758 3d2aa2734d6cb49c43565e3ac8584ba8130fe302 --e

[Lldb-commits] [lldb] [llvm] [NFC][DebugInfo] Make some block-start-position methods return iterators (PR #124287)

2025-01-24 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Jeremy Morse (jmorse) Changes As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. A number of these (such as getFirstNonPHIOrDbg) are suffic

[Lldb-commits] [lldb] [llvm] [NFC][DebugInfo] Make some block-start-position methods return iterators (PR #124287)

2025-01-24 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-backend-nvptx Author: Jeremy Morse (jmorse) Changes As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. A number of these (such as getFirstNonPHIOrDbg) are sufficie

[Lldb-commits] [lldb] [llvm] [NFC][DebugInfo] Make some block-start-position methods return iterators (PR #124287)

2025-01-24 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-llvm-ir Author: Jeremy Morse (jmorse) Changes As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. A number of these (such as ge

[Lldb-commits] [lldb] [lldb][TypeSystem] Ensure that ParmVarDecls have the correct DeclContext (PR #124279)

2025-01-24 Thread Michael Buch via lldb-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/124279 While sifting through this part of the code I noticed that when we parse C++ methods, `DWARFASTParserClang` creates two sets of `ParmVarDecls`, one in `ParseChildParameters` and once in `AddMethodToCXXRecord

[Lldb-commits] [lldb] [lldb][TypeSystem] Ensure that ParmVarDecls have the correct DeclContext (PR #124279)

2025-01-24 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) Changes While sifting through this part of the code I noticed that when we parse C++ methods, `DWARFASTParserClang` creates two sets of `ParmVarDecls`, one in `ParseChildParameters` and once in `AddMethodToCXXReco

[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)

2025-01-24 Thread David Spickett via lldb-commits
@@ -83,3 +83,278 @@ def test_gcs_fault(self): "stop reason = signal SIGSEGV: control protection fault", ], ) + +def check_gcs_registers( +self, +expected_gcs_features_enabled=None, +expected_gcs_features_locked=Non

[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)

2025-01-24 Thread David Spickett via lldb-commits
@@ -87,6 +150,18 @@ bool ABISysV_arm64::PrepareTrivialCall(Thread &thread, addr_t sp, if (args.size() > 8) return false; + // Do this first, as it's got the most chance of failing (though still very + // low). + if (GetProcessSP()->GetTarget().GetArchitecture().GetTr

[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)

2025-01-24 Thread David Spickett via lldb-commits
@@ -60,6 +60,69 @@ ABISysV_arm64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) return ABISP(); } +static Status PushToLinuxGuardedControlStack(addr_t return_addr, + RegisterContext *reg_ctx, +

[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)

2025-01-24 Thread David Spickett via lldb-commits
DavidSpickett wrote: This conflicts a lot with main but I'm going to deal with that after approval. https://github.com/llvm/llvm-project/pull/123918 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)

2025-01-24 Thread David Spickett via lldb-commits
@@ -103,6 +156,9 @@ bool ABISysV_arm64::PrepareTrivialCall(Thread &thread, addr_t sp, return_addr)) return false; + if (GetProcessSP()->GetTarget().GetArchitecture().GetTriple().isOSLinux()) +PushToLinuxGuardedControlStack(return_addr, reg_ctx, thread); ---

[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/123918 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/123918 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/123918 >From 951a38910e49f3e93dc6c9a084e955ab01ad4c49 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Fri, 9 Aug 2024 11:56:29 +0100 Subject: [PATCH 1/4] [lldb][AArch64] Add Guarded Control Stack registers T

[Lldb-commits] [lldb] [lldb] Remove unused posix_openpt function definition for Android (PR #124257)

2025-01-24 Thread via lldb-commits
https://github.com/enh-google approved this pull request. https://github.com/llvm/llvm-project/pull/124257 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack registers (PR #123720)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/123720 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 02c6002 - [lldb][AArch64] Add Guarded Control Stack registers (#123720)

2025-01-24 Thread via lldb-commits
Author: David Spickett Date: 2025-01-24T13:42:06Z New Revision: 02c6002d1cd2dabe4b98368f91e7b4395e5ab11d URL: https://github.com/llvm/llvm-project/commit/02c6002d1cd2dabe4b98368f91e7b4395e5ab11d DIFF: https://github.com/llvm/llvm-project/commit/02c6002d1cd2dabe4b98368f91e7b4395e5ab11d.diff LOG

[Lldb-commits] [lldb] [lldb-dap] Implement `runInTerminal` for Windows (PR #121269)

2025-01-24 Thread Hu Jialun via lldb-commits
@@ -71,12 +74,14 @@ class FifoFileIO { /// \return /// An \a llvm::Error object indicating whether the data was consumed by /// a reader or not. - llvm::Error SendJSON( - const llvm::json::Value &json, - std::chrono::milliseconds timeout = std::chrono::

[Lldb-commits] [lldb] [lldb-dap] Implement `runInTerminal` for Windows (PR #121269)

2025-01-24 Thread Hu Jialun via lldb-commits
@@ -21,21 +23,22 @@ namespace lldb_dap { /// The file is destroyed when the destructor is invoked. struct FifoFile { FifoFile(llvm::StringRef path); + FifoFile(llvm::StringRef path, FILE *f); + // FifoFile(llvm::StringRef path, FILE *f); + FifoFile(FifoFile &&other); + +

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack registers (PR #123720)

2025-01-24 Thread David Spickett via lldb-commits
@@ -2,8 +2,8 @@ #include #include -#ifndef HWCAP2_GCS -#define HWCAP2_GCS (1UL << 63) +#ifndef HWCAP_GCS +#define HWCAP_GCS (1UL << 32) DavidSpickett wrote: Mark Brown confirmed that the documentation is incorrect. It is in HWCAP as the code shows. https:

[Lldb-commits] [lldb] Reland "[lldb] Implement basic support for reverse-continue" (#123906)" (PR #123945)

2025-01-24 Thread Pavel Labath via lldb-commits
labath wrote: I ran this on an arm mac, and also on x86-via-rosetta mac (which isn't quite the same as native, but it's the best I have). I did find one problem, which is that the packet forwarder misinterprets a response to the `x` packet which begins with an `O` as an "output" packet. I gues

[Lldb-commits] [lldb] [lldb-dap] Implement `runInTerminal` for Windows (PR #121269)

2025-01-24 Thread Hu Jialun via lldb-commits
https://github.com/SuibianP updated https://github.com/llvm/llvm-project/pull/121269 >From dc866c2d106292b7fe49f8c1ac45dbd3905b81d6 Mon Sep 17 00:00:00 2001 From: Hu Jialun Date: Sat, 28 Dec 2024 22:39:33 +0800 Subject: [PATCH] [lldb-dap] Implement runInTerminal for Windows Currently, the name

[Lldb-commits] [lldb] [lldb-dap] Implement `runInTerminal` for Windows (PR #121269)

2025-01-24 Thread Hu Jialun via lldb-commits
@@ -158,13 +164,24 @@ std::string RunInTerminalDebugAdapterCommChannel::GetLauncherError() { } Expected> CreateRunInTerminalCommFile() { + int comm_fd; SmallString<256> comm_file; - if (std::error_code EC = sys::fs::getPotentiallyUniqueTempFileName( - "lldb-dap-

[Lldb-commits] [lldb] [lldb-dap] Implement `runInTerminal` for Windows (PR #121269)

2025-01-24 Thread Hu Jialun via lldb-commits
@@ -111,8 +111,10 @@ Error RunInTerminalLauncherCommChannel::WaitUntilDebugAdaptorAttaches( return message.takeError(); } -Error RunInTerminalLauncherCommChannel::NotifyPid() { - return m_io.SendJSON(RunInTerminalMessagePid(getpid()).ToJSON()); +Error RunInTerminalLaunch

[Lldb-commits] [lldb] [lldb-dap] Implement `runInTerminal` for Windows (PR #121269)

2025-01-24 Thread Hu Jialun via lldb-commits
@@ -71,12 +74,14 @@ class FifoFileIO { /// \return /// An \a llvm::Error object indicating whether the data was consumed by /// a reader or not. - llvm::Error SendJSON( - const llvm::json::Value &json, - std::chrono::milliseconds timeout = std::chrono::

[Lldb-commits] [lldb] [lldb] Use the first address range as the function address (PR #122440)

2025-01-24 Thread Pavel Labath via lldb-commits
labath wrote: Thank you both. The cases where I'm creating a function with a single range are all in non-DWARF plugins, and the range is the only one we have available. Breakpad definitely doesn't support multiple function ranges. I'm not sure about PDB, but I didn't find anything obvious ther

[Lldb-commits] [lldb] [lldb] Use the first address range as the function address (PR #122440)

2025-01-24 Thread Pavel Labath via lldb-commits
https://github.com/labath closed https://github.com/llvm/llvm-project/pull/122440 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 57b4898 - [lldb] Use the first address range as the function address (#122440)

2025-01-24 Thread via lldb-commits
Author: Pavel Labath Date: 2025-01-24T12:50:06+01:00 New Revision: 57b48987f6c21e369e7bb1626dc79ca74aa34fdb URL: https://github.com/llvm/llvm-project/commit/57b48987f6c21e369e7bb1626dc79ca74aa34fdb DIFF: https://github.com/llvm/llvm-project/commit/57b48987f6c21e369e7bb1626dc79ca74aa34fdb.diff

[Lldb-commits] [lldb] [lldb] Remove unused posix_openpt function definition for Android (PR #124257)

2025-01-24 Thread Brad Smith via lldb-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/124257 This was for the wrapper function that was in source/Host/android/LibcGlue.cpp. Android added support 10+ years ago. >From ed441c18d824e25a184f348a0dba7019cfb01b6f Mon Sep 17 00:00:00 2001 From: Brad Smith Date:

[Lldb-commits] [lldb] [lldb] Remove unused posix_openpt function definition for Android (PR #124257)

2025-01-24 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/124257 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove unused posix_openpt function definition for Android (PR #124257)

2025-01-24 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Brad Smith (brad0) Changes This was for the wrapper function that was in source/Host/android/LibcGlue.cpp. Android added support 10+ years ago. --- Full diff: https://github.com/llvm/llvm-project/pull/124257.diff 1 Files Affected: - (mod

[Lldb-commits] [lldb] [LLDB] Add Lexer (with tests) for DIL (Data Inspection Language). (PR #123521)

2025-01-24 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,156 @@ +//===-- DILLexer.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [LLDB] Add Lexer (with tests) for DIL (Data Inspection Language). (PR #123521)

2025-01-24 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,156 @@ +//===-- DILLexer.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][Formatters] Do not recursively dereference pointer type when creating formatter candicates list. (PR #124048)

2025-01-24 Thread Pavel Labath via lldb-commits
labath wrote: > @labath What do you think? The solution above will still use the formatters > for `T` when `T**` is printed. Before I answer that, I want to go back to the question of dereferencing. While I don't think that skipping of arbitrary numbers of points is *wrong* (it's consistent a

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack registers (PR #123720)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/123720 >From 951a38910e49f3e93dc6c9a084e955ab01ad4c49 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Fri, 9 Aug 2024 11:56:29 +0100 Subject: [PATCH 1/3] [lldb][AArch64] Add Guarded Control Stack registers T

[Lldb-commits] [lldb] [lldb] Add SymbolContext::GetAddress (PR #123340)

2025-01-24 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/123340 >From 2d8987fbffa462c671f0e8cc40accc6ff63aa625 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Fri, 17 Jan 2025 12:36:36 +0100 Subject: [PATCH] [lldb] Add SymbolContext::GetFunctionOrSymbolAddress Many uses of

[Lldb-commits] [lldb] [lldb-dap] Ensure the IO forwarding threads are managed by the DAP object lifecycle. (PR #122783)

2025-01-24 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/122783 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add SymbolContext::GetFunctionOrSymbolAddress (PR #123340)

2025-01-24 Thread Pavel Labath via lldb-commits
@@ -370,6 +370,31 @@ bool SymbolContext::GetAddressRange(uint32_t scope, uint32_t range_idx, return false; } +Address SymbolContext::GetAddress(uint32_t scope, + bool use_inline_block_range) const { + if ((scope & eSymbolContextLineEntry) &

[Lldb-commits] [lldb] [lldb] Add SymbolContext::GetFunctionOrSymbolAddress (PR #123340)

2025-01-24 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/123340 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add SymbolContext::GetFunctionOrSymbolAddress (PR #123340)

2025-01-24 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/123340 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack registers (PR #123720)

2025-01-24 Thread David Spickett via lldb-commits
@@ -83,3 +83,137 @@ def test_gcs_fault(self): "stop reason = signal SIGSEGV: control protection fault", ], ) + +@skipUnlessArch("aarch64") +@skipUnlessPlatform(["linux"]) +def test_gcs_registers(self): +if not self.isAArch

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack registers (PR #123720)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett updated https://github.com/llvm/llvm-project/pull/123720 >From 951a38910e49f3e93dc6c9a084e955ab01ad4c49 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Fri, 9 Aug 2024 11:56:29 +0100 Subject: [PATCH 1/2] [lldb][AArch64] Add Guarded Control Stack registers T

[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)

2025-01-24 Thread David Spickett via lldb-commits
@@ -103,6 +156,9 @@ bool ABISysV_arm64::PrepareTrivialCall(Thread &thread, addr_t sp, return_addr)) return false; + if (GetProcessSP()->GetTarget().GetArchitecture().GetTriple().isOSLinux()) +PushToLinuxGuardedControlStack(return_addr, reg_ctx, thread); ---

[Lldb-commits] [lldb] [lldb][AArch64] Fix expression evaluation with Guarded Control Stacks (PR #123918)

2025-01-24 Thread David Spickett via lldb-commits
@@ -103,6 +156,9 @@ bool ABISysV_arm64::PrepareTrivialCall(Thread &thread, addr_t sp, return_addr)) return false; + if (GetProcessSP()->GetTarget().GetArchitecture().GetTriple().isOSLinux()) +PushToLinuxGuardedControlStack(return_addr, reg_ctx, thread); ---

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack registers (PR #123720)

2025-01-24 Thread David Spickett via lldb-commits
@@ -83,3 +83,137 @@ def test_gcs_fault(self): "stop reason = signal SIGSEGV: control protection fault", ], ) + +@skipUnlessArch("aarch64") +@skipUnlessPlatform(["linux"]) +def test_gcs_registers(self): +if not self.isAArch

[Lldb-commits] [lldb] [lldb][AArch64] Add Guarded Control Stack registers (PR #123720)

2025-01-24 Thread David Spickett via lldb-commits
@@ -2,8 +2,8 @@ #include #include -#ifndef HWCAP2_GCS -#define HWCAP2_GCS (1UL << 63) +#ifndef HWCAP_GCS +#define HWCAP_GCS (1UL << 32) DavidSpickett wrote: Yes that is strange. Initially it was a HWCAP2 value but it was moved for some reason. I think this

[Lldb-commits] [lldb] [lldb][LoongArch] Complete register alias name in `AugmentRegisterInfo` (PR #124059)

2025-01-24 Thread David Spickett via lldb-commits
DavidSpickett wrote: `lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py` - `test_loongarch64_regs` for example. You should be able to read all those registers using the aliases as well as the normal names. If you look through the LoongArch lldb changes you'll probably find the

[Lldb-commits] [lldb] [lldb] Use the first address range as the function address (PR #122440)

2025-01-24 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/122440 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] eda1699 - [lldb] Enable the use of dladdr() on Android (#124187)

2025-01-24 Thread via lldb-commits
Author: Brad Smith Date: 2025-01-24T03:19:34-05:00 New Revision: eda16991adeb078647b2d239fcf666ddece5c30a URL: https://github.com/llvm/llvm-project/commit/eda16991adeb078647b2d239fcf666ddece5c30a DIFF: https://github.com/llvm/llvm-project/commit/eda16991adeb078647b2d239fcf666ddece5c30a.diff LO

[Lldb-commits] [lldb] [lldb] Enable the use of dladdr() on Android (PR #124187)

2025-01-24 Thread Brad Smith via lldb-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/124187 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Check Android API for existence of getgrgid_r() introduced in 24 (PR #124182)

2025-01-24 Thread Brad Smith via lldb-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/124182 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] a6cfde6 - [lldb] Check Android API for existence of getgrgid_r() introduced in 24 (#124182)

2025-01-24 Thread via lldb-commits
Author: Brad Smith Date: 2025-01-24T03:18:36-05:00 New Revision: a6cfde62bb89e595db2bf7bb8ae810293d8edf26 URL: https://github.com/llvm/llvm-project/commit/a6cfde62bb89e595db2bf7bb8ae810293d8edf26 DIFF: https://github.com/llvm/llvm-project/commit/a6cfde62bb89e595db2bf7bb8ae810293d8edf26.diff LO

[Lldb-commits] [lldb] [lldb] Enable the use of dladdr() on Android (PR #124187)

2025-01-24 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/124187 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Check Android API for existence of getgrgid_r() introduced in 24 (PR #124182)

2025-01-24 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/124182 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove support and workarounds for Android 4 and older (PR #124047)

2025-01-24 Thread Pavel Labath via lldb-commits
labath wrote: All of these workarounds are very old. They date back to the time that API level 21 was brand sparkling new, we were trying to support everything back to level 8, and NDK headers were missing many important functions. This is why you can find references to highly questionable pra

[Lldb-commits] [lldb] WIP: Stop using replicated variable ids (PR #124232)

2025-01-24 Thread Anthony Eid via lldb-commits
https://github.com/Anthony-Eid updated https://github.com/llvm/llvm-project/pull/124232 >From e741fc75ccb6e2a725b3b26dd4c503cdea6c5fbb Mon Sep 17 00:00:00 2001 From: Anthony Eid Date: Fri, 24 Jan 2025 00:43:39 -0500 Subject: [PATCH 1/2] Stop using replicated variable ids --- lldb/tools/lldb-d