[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/118043 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett commented: Looking good, I will test this version today. https://github.com/llvm/llvm-project/pull/118043 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-co

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,90 @@ +//===-- NativeRegisterContextDBReg.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: Apa

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
DavidSpickett wrote: And now I see that x86 has a `NativeRegisterContextDBReg_x86` class. The way it stores registers is quite different though, so I don't think: 1. We can share that much code without changing how it reads the registers. 2. That it's a problem if we just leave `NativeRegisterCo

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,400 @@ +//===-- NativeRegisterContextDBReg.cpp ===// +// +// 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][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,400 @@ +//===-- NativeRegisterContextDBReg.cpp ===// +// +// 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][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -272,199 +57,27 @@ uint32_t NativeRegisterContextDBReg_arm64::SetHardwareWatchpoint( addr = addr & (~0x07); } - - // Setup control value - control_value = g_enable_bit | g_pac_bits | GetSizeBits(size); - control_value |= watch_flags << 3; - - // Iterate over stor

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,90 @@ +//===-- NativeRegisterContextDBReg.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: Apa

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -272,199 +57,27 @@ uint32_t NativeRegisterContextDBReg_arm64::SetHardwareWatchpoint( addr = addr & (~0x07); } - - // Setup control value - control_value = g_enable_bit | g_pac_bits | GetSizeBits(size); - control_value |= watch_flags << 3; - - // Iterate over stor

[Lldb-commits] [lldb] [lldb] Reduce the frequency of DWARF index progress reporting (PR #118953)

2024-12-06 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pavel Labath (labath) Changes Indexing a single DWARF unit is a relatively fast operation, particularly if it's a type unit, which can be very small. Reporting progress takes a mutex (and allocates memory, etc.), which creates a lot of con

[Lldb-commits] [lldb] [lldb] Reduce the frequency of DWARF index progress reporting (PR #118953)

2024-12-06 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/118953 Indexing a single DWARF unit is a relatively fast operation, particularly if it's a type unit, which can be very small. Reporting progress takes a mutex (and allocates memory, etc.), which creates a lot of conte

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -9,79 +9,16 @@ #ifndef lldb_NativeRegisterContextDBReg_arm64_h #define lldb_NativeRegisterContextDBReg_arm64_h -#include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h" - -#include +#include "Plugins/Process/Utility/NativeRegisterContextDBReg.h" namespace

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2024-12-06 Thread Michael Buch via lldb-commits
Michael137 wrote: > So, is this patch worth pursuing or is it too much code for a too specific > use case? Sorry I was out for a few weeks when you pinged. I'll have another pass/think about it early next week (if nobody else gets to it before me). https://github.com/llvm/llvm-project/pull/11

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -272,199 +57,27 @@ uint32_t NativeRegisterContextDBReg_arm64::SetHardwareWatchpoint( addr = addr & (~0x07); } - - // Setup control value - control_value = g_enable_bit | g_pac_bits | GetSizeBits(size); - control_value |= watch_flags << 3; - - // Iterate over stor

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -9,79 +9,16 @@ #ifndef lldb_NativeRegisterContextDBReg_arm64_h #define lldb_NativeRegisterContextDBReg_arm64_h -#include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h" - -#include +#include "Plugins/Process/Utility/NativeRegisterContextDBReg.h" namespace

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
DavidSpickett wrote: The test failures were caused by: ``` virtual bool ValidateWatchpoint(size_t size, lldb::addr_t &addr) = 0; ``` Which is actually trying to change size for AArch64, but it's passed by copy so it wasn't being updated in the caller. See my comments on those lines. With that f

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -9,79 +9,16 @@ #ifndef lldb_NativeRegisterContextDBReg_arm64_h #define lldb_NativeRegisterContextDBReg_arm64_h -#include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h" - -#include +#include "Plugins/Process/Utility/NativeRegisterContextDBReg.h" namespace

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
@@ -9,79 +9,16 @@ #ifndef lldb_NativeRegisterContextDBReg_arm64_h #define lldb_NativeRegisterContextDBReg_arm64_h -#include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h" - -#include +#include "Plugins/Process/Utility/NativeRegisterContextDBReg.h" namespace

[Lldb-commits] [lldb] [lldb] Include `` for `system_clock` and `now` (PR #118059)

2024-12-06 Thread Lily Wang via lldb-commits
LilyWangLL wrote: > (Please let us know if you need someone to press the merge button for you) Please merge this PR, thanks~ https://github.com/llvm/llvm-project/pull/118059 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.

[Lldb-commits] [lldb] [lldb] Fix the SocketTest failure on unsupported hosts (PR #118673)

2024-12-06 Thread Pavel Labath via lldb-commits
@@ -116,6 +116,30 @@ bool lldb_private::HostSupportsIPv6() { return CheckIPSupport("IPv6", "[::1]:0"); } +bool lldb_private::HostSupportsLocalhostToIPv4() { + if (!HostSupportsIPv4()) +return false; + + auto addresses = SocketAddress::GetAddressInfo( + "localhost"

[Lldb-commits] [lldb] [lldb] Reduce the frequency of DWARF index progress reporting (PR #118953)

2024-12-06 Thread via lldb-commits
SingleAccretion wrote: I would like to say I would love for this improvement to land :). I have observed that on Windows with a good number (4K+) of small compile units the progress reporting completely dominates indexing time due to contention (presumably not just in the lock but also the IO

[Lldb-commits] [lldb] [LLDB][Process/Utility] Introduce NativeRegisterContextDBReg class (PR #118043)

2024-12-06 Thread David Spickett via lldb-commits
DavidSpickett wrote: Something is up with watchpoints: ``` Failed Tests (12): lldb-api :: commands/watchpoints/multi_watchpoint_slots/TestWatchpointMultipleSlots.py lldb-api :: commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py lldb-api :: commands/watchpoints/

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue.child (PR #118814)

2024-12-06 Thread Pavel Labath via lldb-commits
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue) if -count <= key < count: key %= count return self.sbvalue.GetChildAtIndex(key) +elif isinstance(key, str): +if child :=

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue.child (PR #118814)

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

[Lldb-commits] [lldb] 72aefbb - [lldb] Include `` for `system_clock` and `now` (#118059)

2024-12-06 Thread via lldb-commits
Author: Lily Wang Date: 2024-12-06T09:18:00Z New Revision: 72aefbb5d06f3b82ded6fa499c3994f5d03aba57 URL: https://github.com/llvm/llvm-project/commit/72aefbb5d06f3b82ded6fa499c3994f5d03aba57 DIFF: https://github.com/llvm/llvm-project/commit/72aefbb5d06f3b82ded6fa499c3994f5d03aba57.diff LOG: [ll

[Lldb-commits] [lldb] [lldb] Include `` for `system_clock` and `now` (PR #118059)

2024-12-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/118059 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Include `` for `system_clock` and `now` (PR #118059)

2024-12-06 Thread via lldb-commits
github-actions[bot] wrote: @LilyWangLL 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.org/buildbot/). If there is a problem with a bui

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Jonas Devlieghere via lldb-commits
@@ -473,6 +473,32 @@ class Platform : public PluginInterface { LLVM_PRETTY_FUNCTION, GetName())); } + /// Search CU for the SDK path the CUs was compiled against. + /// + /// \param[in] unit The CU + /// + /// \returns If successful, returns a pars

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Jonas Devlieghere via lldb-commits
@@ -473,6 +473,32 @@ class Platform : public PluginInterface { LLVM_PRETTY_FUNCTION, GetName())); } + /// Search CU for the SDK path the CUs was compiled against. + /// + /// \param[in] unit The CU + /// + /// \returns If successful, returns a pars

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/119022 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/119022 >From 60ab35f50652e761d465cc1410b8d3352fa86b3f Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 6 Dec 2024 12:09:27 -0800 Subject: [PATCH] [lldb] Add a per-CU API to read the SDK. This is needed by

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Adrian Prantl via lldb-commits
@@ -1429,3 +1430,40 @@ PlatformDarwin::ResolveSDKPathFromDebugInfo(Module &module) { return path_or_err->str(); } + +llvm::Expected> +PlatformDarwin::GetSDKPathFromDebugInfo(CompileUnit &unit) { + ModuleSP module_sp = unit.CalculateSymbolContextModule(); + if (!module_sp)

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

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

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/119022 >From 60ab35f50652e761d465cc1410b8d3352fa86b3f Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 6 Dec 2024 12:09:27 -0800 Subject: [PATCH 1/2] [lldb] Add a per-CU API to read the SDK. This is neede

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Adrian Prantl via lldb-commits
@@ -473,6 +473,32 @@ class Platform : public PluginInterface { LLVM_PRETTY_FUNCTION, GetName())); } + /// Search CU for the SDK path the CUs was compiled against. + /// + /// \param[in] unit The CU + /// + /// \returns If successful, returns a pars

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Jonas Devlieghere via lldb-commits
@@ -473,6 +473,32 @@ class Platform : public PluginInterface { LLVM_PRETTY_FUNCTION, GetName())); } + /// Search CU for the SDK path the CUs was compiled against. + /// + /// \param[in] unit The CU + /// + /// \returns If successful, returns a pars

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread via lldb-commits
https://github.com/Alexizx0078 approved this pull request. https://github.com/llvm/llvm-project/pull/119022 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 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 1d95825d4d168a17a4f27401dec3f2977a59a70e 4facb5fc17280c27af99b014e621f7a573afb929 --e

[Lldb-commits] [lldb] 01d8e0f - [lldb] Add a per-CU API to read the SDK (#119022)

2024-12-06 Thread via lldb-commits
Author: Adrian Prantl Date: 2024-12-06T14:14:11-08:00 New Revision: 01d8e0fc75a897a6a9c2ce634645457a895ed505 URL: https://github.com/llvm/llvm-project/commit/01d8e0fc75a897a6a9c2ce634645457a895ed505 DIFF: https://github.com/llvm/llvm-project/commit/01d8e0fc75a897a6a9c2ce634645457a895ed505.diff

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl closed https://github.com/llvm/llvm-project/pull/119022 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to lldb/examples (PR #113398)

2024-12-06 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/113398 >From 7e3da87ca896484a11ac09df297183147154ac91 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 22 Oct 2024 16:29:50 -0700 Subject: [PATCH] [lldb] Add a compiler/interpreter of LLDB data formatter

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue.child (PR #118814)

2024-12-06 Thread Dave Lee via lldb-commits
https://github.com/kastiglione updated https://github.com/llvm/llvm-project/pull/118814 >From 639fc6d87345c8d68a822032917102a4225df355 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 4 Dec 2024 14:37:24 -0800 Subject: [PATCH 1/4] [lldb] Add lookup by name to SBValue.child --- lldb/bindings

[Lldb-commits] [lldb] 0ee364d - [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to lldb/examples (#113398)

2024-12-06 Thread via lldb-commits
Author: Adrian Prantl Date: 2024-12-06T15:11:21-08:00 New Revision: 0ee364d2a28104aaa36e246fc8a316f86de32aae URL: https://github.com/llvm/llvm-project/commit/0ee364d2a28104aaa36e246fc8a316f86de32aae DIFF: https://github.com/llvm/llvm-project/commit/0ee364d2a28104aaa36e246fc8a316f86de32aae.diff

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue through new member property (PR #118814)

2024-12-06 Thread Dave Lee via lldb-commits
https://github.com/kastiglione edited https://github.com/llvm/llvm-project/pull/118814 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Greg Clayton via lldb-commits
@@ -473,6 +473,32 @@ class Platform : public PluginInterface { LLVM_PRETTY_FUNCTION, GetName())); } + /// Search CU for the SDK path the CUs was compiled against. + /// + /// \param[in] unit The CU + /// + /// \returns A parsed XcodeSDK object if s

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue through new member property (PR #118814)

2024-12-06 Thread Dave Lee via lldb-commits
https://github.com/kastiglione edited https://github.com/llvm/llvm-project/pull/118814 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue through new member property (PR #118814)

2024-12-06 Thread Dave Lee via lldb-commits
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue) if -count <= key < count: key %= count return self.sbvalue.GetChildAtIndex(key) +elif isinstance(key, str): +if child :=

[Lldb-commits] [lldb] [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to lldb/examples (PR #113398)

2024-12-06 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl closed https://github.com/llvm/llvm-project/pull/113398 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Adrian Prantl via lldb-commits
@@ -473,6 +473,32 @@ class Platform : public PluginInterface { LLVM_PRETTY_FUNCTION, GetName())); } + /// Search CU for the SDK path the CUs was compiled against. + /// + /// \param[in] unit The CU + /// + /// \returns A parsed XcodeSDK object if s

[Lldb-commits] [lldb] 8ab76a4 - Revert "[lldb] Add a compiler/interpreter of LLDB data formatter bytecode to examples"

2024-12-06 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-06T15:34:12-08:00 New Revision: 8ab76a47b242addc82109a3b3b6de9c3d6426eca URL: https://github.com/llvm/llvm-project/commit/8ab76a47b242addc82109a3b3b6de9c3d6426eca DIFF: https://github.com/llvm/llvm-project/commit/8ab76a47b242addc82109a3b3b6de9c3d6426eca.diff

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue through new member property (PR #118814)

2024-12-06 Thread via lldb-commits
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue) if -count <= key < count: key %= count return self.sbvalue.GetChildAtIndex(key) +elif isinstance(key, str): +if child :=

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue through new member property (PR #118814)

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

[Lldb-commits] [lldb] 9f98949 - [lldb] Move the python module import workaround further up

2024-12-06 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-06T17:01:58-08:00 New Revision: 9f98949c9424addbc573fac7912cc164965b8994 URL: https://github.com/llvm/llvm-project/commit/9f98949c9424addbc573fac7912cc164965b8994 DIFF: https://github.com/llvm/llvm-project/commit/9f98949c9424addbc573fac7912cc164965b8994.diff

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-12-06 Thread Greg Clayton via lldb-commits
clayborg wrote: Another thing that might not be abvious is that an instance of this class lives as long as the variable lives so as you are stepping in the same function, we will create one synthetic python instance per raw `lldb.SBValue`. This is why the `def update(self):` function is so imp

[Lldb-commits] [lldb] 60380cd - [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to examples

2024-12-06 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-06T16:10:09-08:00 New Revision: 60380cd27c6fa5ed6e39866c51b18a64bc4d566a URL: https://github.com/llvm/llvm-project/commit/60380cd27c6fa5ed6e39866c51b18a64bc4d566a DIFF: https://github.com/llvm/llvm-project/commit/60380cd27c6fa5ed6e39866c51b18a64bc4d566a.diff

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue through new member property (PR #118814)

2024-12-06 Thread Greg Clayton via lldb-commits
@@ -29,6 +29,19 @@ STRING_EXTENSION_OUTSIDE(SBValue) '''An accessor function that returns a children_access() object which allows lazy member variable access from a lldb.SBValue object.''' return self.children_access (self) +def get_member_acce

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-12-06 Thread Greg Clayton via lldb-commits
clayborg wrote: You also are overwriting the original `lldb.SBValue` with the statement `self.valobj = self.valobj.Dereference()` here: ``` def extract_entries(self): if self.valobj.type.is_pointer: self.valobj = self.valobj.Dereference() ``` You never want to do this bec

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue through new member property (PR #118814)

2024-12-06 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/118814 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-12-06 Thread Greg Clayton via lldb-commits
clayborg wrote: You don't have a "def update(self):" method in your data formatter. This is what causes the values to be refetched. I think if you rename "extract_entries" to be named "update" it will fix your synthetic child provider. https://github.com/llvm/llvm-project/pull/117755

[Lldb-commits] [lldb] Bugfix: Not showing the synthetic children of values behind pointers (PR #117755)

2024-12-06 Thread Greg Clayton via lldb-commits
clayborg wrote: the `def update(self):` is a mandatory function that is automatically called for you by the LLDB python synthetic child provider when a variable needs to be updated, so you can't rename it. Since you renamed that to be `extract_entries`, your synthetic child provider will never

[Lldb-commits] [lldb] b504c87 - Revert "[lldb] Add a compiler/interpreter of LLDB data formatter bytecode to examples"

2024-12-06 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-06T16:26:55-08:00 New Revision: b504c8771f238883ef6c7234d741c2dc1d885ae3 URL: https://github.com/llvm/llvm-project/commit/b504c8771f238883ef6c7234d741c2dc1d885ae3 DIFF: https://github.com/llvm/llvm-project/commit/b504c8771f238883ef6c7234d741c2dc1d885ae3.diff

[Lldb-commits] [lldb] fffe8c6 - [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to examples

2024-12-06 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-06T16:27:16-08:00 New Revision: fffe8c668461e73055182f229765cb7de908e295 URL: https://github.com/llvm/llvm-project/commit/fffe8c668461e73055182f229765cb7de908e295 DIFF: https://github.com/llvm/llvm-project/commit/fffe8c668461e73055182f229765cb7de908e295.diff

[Lldb-commits] [lldb] [lldb][test] Skip libc++ tests if it is linked statically (PR #113935)

2024-12-06 Thread Vladislav Dzhidzhoev via lldb-commits
dzhidzhoev wrote: Thank you for the feedback! I was sorting out the ways to fix that. IMO explicitly referencing symbols that are referenced implicitly from the library could work, but it would look obscure. I'd try again with the solution like this https://github.com/llvm/llvm-project/pull/98

[Lldb-commits] [lldb] [lldb][test] Skip libc++ tests if it is linked statically (PR #113935)

2024-12-06 Thread Vladislav Dzhidzhoev via lldb-commits
https://github.com/dzhidzhoev closed https://github.com/llvm/llvm-project/pull/113935 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][test] Link certain libc++ tests with the whole library (PR #118986)

2024-12-06 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Vladislav Dzhidzhoev (dzhidzhoev) Changes Some tests from 'import-std-module' used to fail on the builder https://lab.llvm.org/staging/#/builders/195/builds/4470, since libcxx is set up to be linked statically with test binaries on it. Th

[Lldb-commits] [lldb] [lldb][test] Enable static linking with libcxx for import-std-module tests (PR #98701)

2024-12-06 Thread Vladislav Dzhidzhoev via lldb-commits
dzhidzhoev wrote: Closed in favor of https://github.com/llvm/llvm-project/pull/118986 https://github.com/llvm/llvm-project/pull/98701 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][test] Enable static linking with libcxx for import-std-module tests (PR #98701)

2024-12-06 Thread Vladislav Dzhidzhoev via lldb-commits
https://github.com/dzhidzhoev closed https://github.com/llvm/llvm-project/pull/98701 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][test] Link certain libc++ tests with the whole library (PR #118986)

2024-12-06 Thread Vladislav Dzhidzhoev via lldb-commits
https://github.com/dzhidzhoev created https://github.com/llvm/llvm-project/pull/118986 Some tests from 'import-std-module' used to fail on the builder https://lab.llvm.org/staging/#/builders/195/builds/4470, since libcxx is set up to be linked statically with test binaries on it. Thus, they w

[Lldb-commits] [lldb] [lldb] Fix typos in `StackFrame.cpp` (PR #118991)

2024-12-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/118991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] e68a3e4 - [lldb] Fix typos in `StackFrame.cpp` (#118991)

2024-12-06 Thread via lldb-commits
Author: Ping Charoenwet Date: 2024-12-06T16:08:08Z New Revision: e68a3e4d0dd349a34c02471438d2e97c2b29e846 URL: https://github.com/llvm/llvm-project/commit/e68a3e4d0dd349a34c02471438d2e97c2b29e846 DIFF: https://github.com/llvm/llvm-project/commit/e68a3e4d0dd349a34c02471438d2e97c2b29e846.diff LO

[Lldb-commits] [lldb] [lldb] Fix typos in `StackFrame.cpp` (PR #118991)

2024-12-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/118991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix typos in `StackFrame.cpp` (PR #118991)

2024-12-06 Thread via lldb-commits
github-actions[bot] wrote: @phnx 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.org/buildbot/). If there is a problem with a build, yo

[Lldb-commits] [lldb] [lldb] Fix typo in `StackFrame.cpp` (PR #118991)

2024-12-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett approved this pull request. Thanks, much appreciated! https://github.com/llvm/llvm-project/pull/118991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commi

[Lldb-commits] [lldb] [lldb] Fix typos in `StackFrame.cpp` (PR #118991)

2024-12-06 Thread David Spickett via lldb-commits
DavidSpickett wrote: I'm going to merge this as is, but there are more uses of `sythetic` in `lldb/` you can fix if you like. None of them should break any tests if changed. https://github.com/llvm/llvm-project/pull/118991 ___ lldb-commits mailing lis

[Lldb-commits] [lldb] [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to lldb/examples (PR #113398)

2024-12-06 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,238 @@ +Formatter Bytecode +== + +Background +-- + +LLDB provides very rich customization options to display data types (see :doc:`/use/variable/`). To use custom data formatters, developers need to edit the global `~/.lldbinit` file to make su

[Lldb-commits] [lldb] [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to lldb/examples (PR #113398)

2024-12-06 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,238 @@ +Formatter Bytecode +== + +Background +-- + +LLDB provides very rich customization options to display data types (see :doc:`/use/variable/`). To use custom data formatters, developers need to edit the global `~/.lldbinit` file to make su

[Lldb-commits] [lldb] [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to lldb/examples (PR #113398)

2024-12-06 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/113398 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to lldb/examples (PR #113398)

2024-12-06 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,167 @@ +""" +This is the llvm::Optional data formatter from llvm/utils/lldbDataFormatters.py +with the implementation replaced by bytecode. +""" + +from __future__ import annotations +from formatter_bytecode import * +import lldb + + +def __lldb_init_module(debugger, in

[Lldb-commits] [lldb] [lldb] Fix off by one in array index check (PR #118995)

2024-12-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/118995 Reported in #116944 / https://pvs-studio.com/en/blog/posts/cpp/1188/. >From 6a227a0ee3e6b4c0091b94f69d348f155575192a Mon Sep 17 00:00:00 2001 From: David Spickett Date: Fri, 6 Dec 2024 16:21:51 + Subj

[Lldb-commits] [lldb] [lldb] Fix off by one in array index check in Objective C runtime plugin (PR #118995)

2024-12-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/118995 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix off by one in array index check in Objective C runtime plugin (PR #118995)

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

[Lldb-commits] [lldb] [lldb] Fix off by one in array index check in Objective C runtime plugin (PR #118995)

2024-12-06 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: David Spickett (DavidSpickett) Changes Reported in #116944 / https://pvs-studio.com/en/blog/posts/cpp/1188/. --- Full diff: https://github.com/llvm/llvm-project/pull/118995.diff 1 Files Affected: - (modified) lldb/source/Plugins/Languag

[Lldb-commits] [lldb] a46ee73 - [lldb] Fix off by one in array index check in Objective C runtime plugin (#118995)

2024-12-06 Thread via lldb-commits
Author: David Spickett Date: 2024-12-06T16:40:57Z New Revision: a46ee733d244333785c0896ce399341fe30240b0 URL: https://github.com/llvm/llvm-project/commit/a46ee733d244333785c0896ce399341fe30240b0 DIFF: https://github.com/llvm/llvm-project/commit/a46ee733d244333785c0896ce399341fe30240b0.diff LOG

[Lldb-commits] [lldb] [lldb] Fix off by one in array index check in Objective C runtime plugin (PR #118995)

2024-12-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/118995 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add a compiler/interpreter of LLDB data formatter bytecode to lldb/examples (PR #113398)

2024-12-06 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. I left a few nits but overall this LGTM. https://github.com/llvm/llvm-project/pull/113398 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue.child (PR #118814)

2024-12-06 Thread Dave Lee via lldb-commits
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue) if -count <= key < count: key %= count return self.sbvalue.GetChildAtIndex(key) +elif isinstance(key, str): +if child :=

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Adrian Prantl via lldb-commits
@@ -1429,3 +1430,40 @@ PlatformDarwin::ResolveSDKPathFromDebugInfo(Module &module) { return path_or_err->str(); } + +llvm::Expected> +PlatformDarwin::GetSDKPathFromDebugInfo(CompileUnit &unit) { + ModuleSP module_sp = unit.CalculateSymbolContextModule(); + if (!module_sp)

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Adrian Prantl (adrian-prantl) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/119022.diff 4 Files Affected: - (modified) lldb/include/lldb/Target/Platform.h (+32) - (modified) lldb/source/Plugins/Platform/MacOSX/Platfo

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Med Ismail Bennani via lldb-commits
@@ -473,6 +473,38 @@ class Platform : public PluginInterface { LLVM_PRETTY_FUNCTION, GetName())); } + /// Search CU for the SDK paths the CUs was compiled against. In the + /// presence of different SDKs, we try to pick the most appropriate + /// one

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread Med Ismail Bennani via lldb-commits
@@ -1429,3 +1430,40 @@ PlatformDarwin::ResolveSDKPathFromDebugInfo(Module &module) { return path_or_err->str(); } + +llvm::Expected> +PlatformDarwin::GetSDKPathFromDebugInfo(CompileUnit &unit) { + ModuleSP module_sp = unit.CalculateSymbolContextModule(); + if (!module_sp)

[Lldb-commits] [lldb] [lldb] Add a per-CU API to read the SDK (PR #119022)

2024-12-06 Thread via lldb-commits
https://github.com/Alexizx0078 approved this pull request. https://github.com/llvm/llvm-project/pull/119022 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Convert the StackFrameList mutex to a shared mutex. (PR #117252)

2024-12-06 Thread via lldb-commits
@@ -128,30 +130,41 @@ bool StackFrameList::DecrementCurrentInlinedDepth() { } void StackFrameList::SetCurrentInlinedDepth(uint32_t new_depth) { + std::lock_guard guard(m_inlined_depth_mutex); m_current_inlined_depth = new_depth; if (new_depth == UINT32_MAX) m_curre

[Lldb-commits] [lldb] Convert the StackFrameList mutex to a shared mutex. (PR #117252)

2024-12-06 Thread via lldb-commits
https://github.com/jimingham updated https://github.com/llvm/llvm-project/pull/117252 >From b0d2179cf01cdd0b07bc43cef2a8c14d282e7ee7 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Tue, 19 Nov 2024 17:38:02 -0800 Subject: [PATCH 1/4] Convert the recursive StackFrameList mutex to a non-recursiv

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue.child (PR #118814)

2024-12-06 Thread via lldb-commits
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue) if -count <= key < count: key %= count return self.sbvalue.GetChildAtIndex(key) +elif isinstance(key, str): +if child :=

[Lldb-commits] [lldb] [lldb] Reduce the frequency of DWARF index progress reporting (PR #118953)

2024-12-06 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Can we build this feature into the Progress class by calling an accessor? Something like: ``` Progress progress("Manually indexing DWARF", module_desc.GetData(), total_progress); progress.SetMinimumNotificationTime(std::chrono::milliseconds(10)); ``` Then

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue.child (PR #118814)

2024-12-06 Thread via lldb-commits
https://github.com/jimingham edited https://github.com/llvm/llvm-project/pull/118814 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue.child (PR #118814)

2024-12-06 Thread Dave Lee via lldb-commits
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue) if -count <= key < count: key %= count return self.sbvalue.GetChildAtIndex(key) +elif isinstance(key, str): +if child :=

[Lldb-commits] [lldb] [lldb] Reduce the frequency of DWARF index progress reporting (PR #118953)

2024-12-06 Thread Greg Clayton via lldb-commits
clayborg wrote: And the Progress class can check if the an optional instance variable that contains the minimum time has a value and avoid taking the mutex to keep things faster even when building this into the Progress class? https://github.com/llvm/llvm-project/pull/118953 __

[Lldb-commits] [lldb] [lldb] Add lookup by name to SBValue.child (PR #118814)

2024-12-06 Thread via lldb-commits
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue) if -count <= key < count: key %= count return self.sbvalue.GetChildAtIndex(key) +elif isinstance(key, str): +if child :=

[Lldb-commits] [lldb] [lldb-dap] Add attach & corefile templates (PR #118894)

2024-12-06 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: You are a good person, @JDevlieghere https://github.com/llvm/llvm-project/pull/118894 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

  1   2   >