[Lldb-commits] [lldb] [lldb][debugserver] Read/write SME registers on arm64 (PR #119171)

2024-12-10 Thread Jason Molenda via lldb-commits
@@ -93,6 +93,55 @@ DNBArchMachARM64::SoftwareBreakpointOpcode(nub_size_t byte_size) { uint32_t DNBArchMachARM64::GetCPUType() { return CPU_TYPE_ARM64; } +static std::once_flag g_cpu_has_sme_once; +bool DNBArchMachARM64::CPUHasSME() { + static bool g_has_sme = false; + std:

[Lldb-commits] [lldb] [lldb][debugserver] Read/write SME registers on arm64 (PR #119171)

2024-12-10 Thread Jason Molenda via lldb-commits
@@ -312,16 +312,21 @@ struct DNBRegisterValue { uint64_t uint64; float float32; double float64; -int8_t v_sint8[64]; -int16_t v_sint16[32]; -int32_t v_sint32[16]; -int64_t v_sint64[8]; -uint8_t v_uint8[64]; -uint16_t v_uint16[32]; -uint32

[Lldb-commits] [clang] [clang-tools-extra] [lld] [lldb] [llvm] Rework the `Option` library to reduce dynamic relocations (PR #119198)

2024-12-10 Thread Chandler Carruth via lldb-commits
@@ -53,10 +53,8 @@ class OptTable { public: /// Entry for a single option instance in the option data table. struct Info { -/// A null terminated array of prefix strings to apply to name while -/// matching. -ArrayRef Prefixes; -StringLiteral PrefixedName; +

[Lldb-commits] [lldb] [lldb][debugserver] Read/write SME registers on arm64 (PR #119171)

2024-12-10 Thread Jason Molenda via lldb-commits
@@ -0,0 +1,163 @@ +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * +import lldbsuite.test.lldbutil as lldbutil +import os + + +class TestSMERegistersDarwin(TestBase): +NO_DEBUG_INFO_TESTCASE = True +mydir = TestBase.compute_mydir

[Lldb-commits] [lldb] [lldb] Add ability to rate-limit progress reports (PR #119377)

2024-12-10 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 ce7771902dc50d900de639d499a60486b83f70e0 a5aced42bb0742d44f5fdae51b77c291c95da340 --e

[Lldb-commits] [lldb] [lldb] Add ability to rate-limit progress reports (PR #119377)

2024-12-10 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pavel Labath (labath) Changes For high-frequency multithreaded progress reports, the contention of taking the progress mutex and the overhead of generating event can significantly slow down the operation whose progress we are reporting. T

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

2024-12-10 Thread Pavel Labath via lldb-commits
labath wrote: > I would like to say I would love for this improvement to land :). > > I have observed that on Windows with a fair 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] Reduce the frequency of DWARF index progress reporting (PR #118953)

2024-12-10 Thread Pavel Labath via lldb-commits
labath wrote: > this patch or the other patch (https://github.com/llvm/llvm-project/pull/119377). Either is fine for the thing I want to see. https://github.com/llvm/llvm-project/pull/118953 ___ lldb-commits mailing list lldb-commits@lists.llvm.org h

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Dave Lee via lldb-commits
@@ -0,0 +1,41 @@ +// A bare-bones llvm::Optional reimplementation. + +template struct MyOptionalStorage { + MyOptionalStorage(T val) : value(val), hasVal(true) {} + MyOptionalStorage() {} + T value; + bool hasVal = false; +}; + +template struct MyOptional { + MyOptionalStor

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/114333 >From 1a650fde4a885420c6f2991b41039c4b16ff42e1 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Wed, 24 Jan 2024 12:42:45 -0800 Subject: [PATCH 1/2] [lldb] Load embedded type summary section (#7859) (#8040)

[Lldb-commits] [lldb] 1a650fd - [lldb] Load embedded type summary section (#7859) (#8040)

2024-12-10 Thread Adrian Prantl via lldb-commits
Author: Dave Lee Date: 2024-12-10T09:36:38-08:00 New Revision: 1a650fde4a885420c6f2991b41039c4b16ff42e1 URL: https://github.com/llvm/llvm-project/commit/1a650fde4a885420c6f2991b41039c4b16ff42e1 DIFF: https://github.com/llvm/llvm-project/commit/1a650fde4a885420c6f2991b41039c4b16ff42e1.diff LOG:

[Lldb-commits] [lldb] 9a9c1d4 - [lldb] Implement a formatter bytecode interpreter in C++

2024-12-10 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-10T09:36:38-08:00 New Revision: 9a9c1d4a6155a96ce9be494cec7e25731d36b33e URL: https://github.com/llvm/llvm-project/commit/9a9c1d4a6155a96ce9be494cec7e25731d36b33e DIFF: https://github.com/llvm/llvm-project/commit/9a9c1d4a6155a96ce9be494cec7e25731d36b33e.diff

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

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

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Adrian Prantl via lldb-commits
@@ -0,0 +1,41 @@ +// A bare-bones llvm::Optional reimplementation. + +template struct MyOptionalStorage { + MyOptionalStorage(T val) : value(val), hasVal(true) {} + MyOptionalStorage() {} + T value; + bool hasVal = false; +}; + +template struct MyOptional { + MyOptionalStor

[Lldb-commits] [lldb] e2bb474 - [lldb] Add comment

2024-12-10 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-10T09:39:51-08:00 New Revision: e2bb47443d2e5c022c7851dd6029e3869fc8835c URL: https://github.com/llvm/llvm-project/commit/e2bb47443d2e5c022c7851dd6029e3869fc8835c DIFF: https://github.com/llvm/llvm-project/commit/e2bb47443d2e5c022c7851dd6029e3869fc8835c.diff

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: @sylvestre Also your revert was incomplete, and you broke a bunch of other lldb bots :-) I reverted your revert with a fix for https://github.com/llvm/llvm-project/issues/119467 https://github.com/llvm/llvm-project/pull/114333 __

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: See https://lab.llvm.org/buildbot/#/builders/59/builds/9599 https://github.com/llvm/llvm-project/pull/114333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 87659a1 - Reland: [lldb] Implement a formatter bytecode interpreter in C++

2024-12-10 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-10T16:37:53-08:00 New Revision: 87659a17d0703c1244211d9f8d1f0c21e816f0e1 URL: https://github.com/llvm/llvm-project/commit/87659a17d0703c1244211d9f8d1f0c21e816f0e1 DIFF: https://github.com/llvm/llvm-project/commit/87659a17d0703c1244211d9f8d1f0c21e816f0e1.diff

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -652,7 +652,7 @@ def assert_match(self, asserter, accumulated_output, context): if not accumulated_output: raise Exception("accumulated_output cannot be none") if not context: -raise Exception("context cannot be none") +ra

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread via lldb-commits
dyung wrote: @adrian-prantl at least one bot still seems to be failing (more missing explicit type conversions?): https://lab.llvm.org/buildbot/#/builders/181/builds/10128 ``` FAILED: tools/lldb/source/DataFormatters/CMakeFiles/lldbDataFormatters.dir/FormatterBytecode.cpp.o /opt/ccache/bin/g+

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -236,11 +236,18 @@ ProcessWindows::DoAttachToProcessWithID(lldb::pid_t pid, return error; } -Status ProcessWindows::DoResume() { +Status ProcessWindows::DoResume(RunDirection direction) { Log *log = GetLog(WindowsLog::Process); llvm::sys::ScopedLock lock(m_mutex);

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: @dyung checking... https://github.com/llvm/llvm-project/pull/114333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 1593f36 - [lldb] Add explicit type conversion

2024-12-10 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-10T17:01:51-08:00 New Revision: 1593f36935edc97bede71bd1d722edf83eaf16a4 URL: https://github.com/llvm/llvm-project/commit/1593f36935edc97bede71bd1d722edf83eaf16a4 DIFF: https://github.com/llvm/llvm-project/commit/1593f36935edc97bede71bd1d722edf83eaf16a4.diff

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: My bad. I literally forgot to git-add that patch to my remand. Pushed as a separate commit now. https://github.com/llvm/llvm-project/pull/114333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: The other lldb bots on the dashboard seem to have turned green again. (Windows is still building, but it was fine before). https://github.com/llvm/llvm-project/pull/114333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

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

2024-12-10 Thread via lldb-commits
@@ -93,25 +94,37 @@ class StackFrameList { bool show_frame_info, uint32_t num_frames_with_source, bool show_unique = false, bool show_hidden = false, const char *frame_marker = nullptr); + + /// Returns w

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

2024-12-10 Thread via lldb-commits
@@ -578,58 +607,36 @@ void StackFrameList::Dump(Stream *s) { StackFrameSP StackFrameList::GetFrameAtIndex(uint32_t idx) { StackFrameSP frame_sp; - std::lock_guard guard(m_mutex); uint32_t original_idx = idx; - uint32_t inlined_depth = GetCurrentInlinedDepth(); - if (

[Lldb-commits] [lldb] [lldb][debugserver] Read/write SME registers on arm64 (PR #119171)

2024-12-10 Thread Jason Molenda via lldb-commits
jasonmolenda wrote: Updated the API test case as per David's suggestions, and remove the code that was using debugserver's SVL as the hardware maximum, depending entirely on the newer sysctl to get the correct value instead. https://github.com/llvm/llvm-project/pull/119171 __

[Lldb-commits] [lldb] [lldb][debugserver] Read/write SME registers on arm64 (PR #119171)

2024-12-10 Thread Jason Molenda via lldb-commits
https://github.com/jasonmolenda updated https://github.com/llvm/llvm-project/pull/119171 >From 2e3738eb7ed356fe4f9ee24a31af55a01b18bd08 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Sun, 8 Dec 2024 22:21:22 -0800 Subject: [PATCH 1/4] [lldb][debugserver] Read/write SME registers on arm64 T

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -2674,6 +2680,9 @@ void PruneThreadPlans(); const AddressRange &range, size_t alignment, Status &error); + lldb::RunDirection GetBaseDirection() const { return m_base_direction; } jimingham wrote: Th

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: On which bot did you see this? I watched the lldb linux arm bot go green earlier today. In any case it looks like there was just one more explicit type conversion missing. https://github.com/llvm/llvm-project/pull/114333 ___ lldb

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -2674,6 +2680,9 @@ void PruneThreadPlans(); const AddressRange &range, size_t alignment, Status &error); + lldb::RunDirection GetBaseDirection() const { return m_base_direction; } jimingham wrote: So

[Lldb-commits] [lldb] [lldb] Add ability to rate-limit progress reports (PR #119377)

2024-12-10 Thread Chelsea Cassanova via lldb-commits
@@ -208,6 +209,110 @@ TEST_F(ProgressReportTest, TestReportDestructionWithPartialProgress) { EXPECT_EQ(data->GetMessage(), "Infinite progress: Report 2"); } +TEST_F(ProgressReportTest, TestFiniteOverflow) { + ListenerSP listener_sp = CreateListenerFor(lldb::eBroadcastBitPr

[Lldb-commits] [lldb] [lldb] Add ability to rate-limit progress reports (PR #119377)

2024-12-10 Thread Chelsea Cassanova via lldb-commits
https://github.com/chelcassanova approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/119377 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Sylvestre Ledru via lldb-commits
sylvestre wrote: it also caused https://github.com/llvm/llvm-project/issues/119467 I am sorry but I pushed a revert of this PR 9a9c1d4a6155a96ce9be494cec7e25731d36b33e and your followup patches: e2bb47443d2e5c022c7851dd6029e3869fc8835c 0be33484853557bc0fd9dfb94e0b6c15dda136ce d300337e93da4ed96b

[Lldb-commits] [lldb] f6012a2 - [lldb] Add cast to fix compile error on 32-bit platforms

2024-12-10 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-10T10:28:14-08:00 New Revision: f6012a209dca6b1866d00e6b4f96279469884320 URL: https://github.com/llvm/llvm-project/commit/f6012a209dca6b1866d00e6b4f96279469884320 DIFF: https://github.com/llvm/llvm-project/commit/f6012a209dca6b1866d00e6b4f96279469884320.diff

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

2024-12-10 Thread via lldb-commits
@@ -119,6 +120,7 @@ bool StackFrameList::DecrementCurrentInlinedDepth() { uint32_t current_inlined_depth = GetCurrentInlinedDepth(); if (current_inlined_depth != UINT32_MAX) { if (current_inlined_depth > 0) { +std::lock_guard guard(m_inlined_depth_mutex);

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

2024-12-10 Thread Pavel Labath via lldb-commits
labath wrote: > What is the resolution if we switch to "time since epoch" in an atomic value? > Can we use some casting to cast a double back into a uint64_t for storage in > an atomic? > That's not a problem. I was referring to the time_point::time_since_epoch() (which returns arbitrary pre

[Lldb-commits] [lldb] [lldb] Add ability to rate-limit progress reports (PR #119377)

2024-12-10 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/119377 For high-frequency multithreaded progress reports, the contention of taking the progress mutex and the overhead of generating event can significantly slow down the operation whose progress we are reporting. Thi

[Lldb-commits] [lldb] [lldb] Add ability to rate-limit progress reports (PR #119377)

2024-12-10 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/119377 >From 92fb3703c697d376d95217a48e9c32b920006bd0 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 10 Dec 2024 13:36:29 +0100 Subject: [PATCH] [lldb] Add ability to rate-limit progress reports For high-freque

[Lldb-commits] [lldb] [LLDB] Add SBProgress so Python scripts can also report progress (PR #119052)

2024-12-10 Thread Pavel Labath via lldb-commits
labath wrote: > The counter-argument is that nothing can prevent users from reporting > arbitrary data and making it look like it originates from LLDB. I think we need to distinguish two kinds of users here. The first one are the ones that sit "outside" of lldb and use the SB API to debug some

[Lldb-commits] [lldb] [lldb] do not show misleading error when there is no frame (PR #119103)

2024-12-10 Thread via lldb-commits
https://github.com/oltolm updated https://github.com/llvm/llvm-project/pull/119103 >From c2e92f6ac1b724f6f43ecea70886b2b6ad4febce Mon Sep 17 00:00:00 2001 From: oltolm Date: Sat, 7 Dec 2024 17:24:07 +0100 Subject: [PATCH] lldb: do not show misleading error when there is no frame --- lldb/sour

[Lldb-commits] [lldb] [lldb] do not show misleading error when there is no frame (PR #119103)

2024-12-10 Thread via lldb-commits
@@ -18,11 +17,8 @@ #include "lldb/Core/Address.h" #include "lldb/Core/Debugger.h" #include "lldb/Expression/ExpressionVariable.h" -#include "lldb/Expression/UserExpression.h" oltolm wrote: done https://github.com/llvm/llvm-project/pull/119103

[Lldb-commits] [lldb] [lldb] do not show misleading error when there is no frame (PR #119103)

2024-12-10 Thread via lldb-commits
@@ -1012,33 +1006,26 @@ bool SBFrame::GetDescription(SBStream &description) { SBValue SBFrame::EvaluateExpression(const char *expr) { LLDB_INSTRUMENT_VA(this, expr); - SBValue result; std::unique_lock lock; ExecutionContext exe_ctx(m_opaque_sp.get(), lock); Stack

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

2024-12-10 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/117252 ___ 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-10 Thread Pavel Labath via lldb-commits
@@ -594,7 +643,7 @@ StackFrameSP StackFrameList::GetFrameAtIndex(uint32_t idx) { // GetFramesUpTo will fill m_frames with as many frames as you asked for, if // there are that many. If there weren't then you asked for too many frames. // GetFramesUpTo returns true if int

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

2024-12-10 Thread Pavel Labath via lldb-commits
@@ -578,58 +607,36 @@ void StackFrameList::Dump(Stream *s) { StackFrameSP StackFrameList::GetFrameAtIndex(uint32_t idx) { StackFrameSP frame_sp; - std::lock_guard guard(m_mutex); uint32_t original_idx = idx; - uint32_t inlined_depth = GetCurrentInlinedDepth(); - if (

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

2024-12-10 Thread Pavel Labath via lldb-commits
@@ -534,33 +569,27 @@ bool StackFrameList::GetFramesUpTo(uint32_t end_idx, // We are done with the old stack frame list, we can release it now. m_prev_frames_sp.reset(); } - -#if defined(DEBUG_STACK_FRAMES) - s.PutCString("\n\nNew frames:\n"); - Dump(&s); - s.EOL()

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

2024-12-10 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Thank you. Despite the number of comments, I think this looks much better. I've made some suggestions that I think could reduce the number of times the mutex is taken (not so much for the performance, but for the readability benefit). I've marked them as op

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

2024-12-10 Thread Pavel Labath via lldb-commits
@@ -25,6 +25,7 @@ #include "lldb/Target/Unwind.h" #include "lldb/Utility/LLDBLog.h" #include "lldb/Utility/Log.h" +#include "llvm/ADT/ScopeExit.h" labath wrote: Not used anymore? https://github.com/llvm/llvm-project/pull/117252 ___

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

2024-12-10 Thread Pavel Labath via lldb-commits
@@ -93,25 +94,37 @@ class StackFrameList { bool show_frame_info, uint32_t num_frames_with_source, bool show_unique = false, bool show_hidden = false, const char *frame_marker = nullptr); + + /// Returns w

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

2024-12-10 Thread Pavel Labath via lldb-commits
@@ -119,6 +120,7 @@ bool StackFrameList::DecrementCurrentInlinedDepth() { uint32_t current_inlined_depth = GetCurrentInlinedDepth(); if (current_inlined_depth != UINT32_MAX) { if (current_inlined_depth > 0) { +std::lock_guard guard(m_inlined_depth_mutex);

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

2024-12-10 Thread Pavel Labath via lldb-commits
@@ -803,13 +819,12 @@ uint32_t StackFrameList::SetSelectedFrame(lldb_private::StackFrame *frame) { break; } } - SetDefaultFileAndLineToSelectedFrame(); - return *m_selected_frame_idx; + result = *m_selected_frame_idx; labath wrote: What's up

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

2024-12-10 Thread Pavel Labath via lldb-commits
@@ -1449,7 +1449,7 @@ void Thread::ClearStackFrames() { // frames: // FIXME: At some point we can try to splice in the frames we have fetched // into the new frame as we make it, but let's not try that now. - if (m_curr_frames_sp && m_curr_frames_sp->GetAllFramesFetched(

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

2024-12-10 Thread Pavel Labath via lldb-commits
@@ -675,19 +682,24 @@ StackFrameSP StackFrameList::GetFrameWithStackID(const StackID &stack_id) { StackFrameSP frame_sp; if (stack_id.IsValid()) { -std::lock_guard guard(m_mutex); uint32_t frame_idx = 0; -// Do a binary search in case the stack frame is alrea

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

2024-12-10 Thread David Spickett via lldb-commits
@@ -0,0 +1,401 @@ +//===-- 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-10 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett commented: This passed all tests. Some remaining cosmetic issues but otherwise looks good. We could go more into the style issues here but 1. This code was like that before, you just moved it, so it's not actually a regression. 2. I don't want to get into refact

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

2024-12-10 Thread David Spickett via lldb-commits
@@ -0,0 +1,401 @@ +//===-- 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-10 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-10 Thread David Spickett via lldb-commits
@@ -234,9 +234,9 @@ class NativeRegisterContextLinux_arm64 size_t GetFPMRBufferSize() { return sizeof(m_fpmr_reg); } - llvm::Error ReadHardwareDebugInfo() override; + Status ReadHardwareDebugInfo() override; DavidSpickett wrote: @wangleiat can you explai

[Lldb-commits] [lldb] [lldb][AIX] Header Parsing for XCOFF Object File in AIX (PR #116338)

2024-12-10 Thread Pavel Labath via lldb-commits
@@ -98,9 +98,20 @@ class ObjectFileXCOFF : public lldb_private::ObjectFile { const lldb::ProcessSP &process_sp, lldb::addr_t header_addr); protected: + typedef struct llvm::object::XCOFFFileHeader64 xcoff_header_t; + + typedef struct llvm::object::XCOFFAuxi

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

2024-12-10 Thread via lldb-commits
@@ -180,7 +180,8 @@ NativeRegisterContextLinux_arm64::NativeRegisterContextLinux_arm64( std::unique_ptr register_info_up) : NativeRegisterContextRegisterInfo(native_thread, register_info_up.release()), - NativeRegisterContex

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

2024-12-10 Thread via lldb-commits
@@ -0,0 +1,401 @@ +//===-- 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-10 Thread via lldb-commits
@@ -234,9 +234,9 @@ class NativeRegisterContextLinux_arm64 size_t GetFPMRBufferSize() { return sizeof(m_fpmr_reg); } - llvm::Error ReadHardwareDebugInfo() override; + Status ReadHardwareDebugInfo() override; wangleiat wrote: Because I noticed that the fu

[Lldb-commits] [lldb] 0be3348 - [lldb] Improve log message to include missing strings

2024-12-10 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-10T09:54:36-08:00 New Revision: 0be33484853557bc0fd9dfb94e0b6c15dda136ce URL: https://github.com/llvm/llvm-project/commit/0be33484853557bc0fd9dfb94e0b6c15dda136ce DIFF: https://github.com/llvm/llvm-project/commit/0be33484853557bc0fd9dfb94e0b6c15dda136ce.diff

[Lldb-commits] [lldb] [lldb] Load embedded type summary section (#7859) (#8040) (PR #113743)

2024-12-10 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: Superseded by https://github.com/llvm/llvm-project/pull/114333 https://github.com/llvm/llvm-project/pull/113743 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Load embedded type summary section (#7859) (#8040) (PR #113743)

2024-12-10 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: I believe I also addressed all outstanding review feedback. https://github.com/llvm/llvm-project/pull/113743 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] d300337 - [lldb] Add cast to fix compile error on 32-but platforms

2024-12-10 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-12-10T10:00:54-08:00 New Revision: d300337e93da4ed96b044557e4b0a30001967cf0 URL: https://github.com/llvm/llvm-project/commit/d300337e93da4ed96b044557e4b0a30001967cf0 DIFF: https://github.com/llvm/llvm-project/commit/d300337e93da4ed96b044557e4b0a30001967cf0.diff

[Lldb-commits] [lldb] [lldb] Load embedded type summary section (#7859) (#8040) (PR #113743)

2024-12-10 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl closed https://github.com/llvm/llvm-project/pull/113743 ___ 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-10 Thread via lldb-commits
@@ -803,13 +819,12 @@ uint32_t StackFrameList::SetSelectedFrame(lldb_private::StackFrame *frame) { break; } } - SetDefaultFileAndLineToSelectedFrame(); - return *m_selected_frame_idx; + result = *m_selected_frame_idx; jimingham wrote: That wa

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

2024-12-10 Thread via lldb-commits
@@ -25,6 +25,7 @@ #include "lldb/Target/Unwind.h" #include "lldb/Utility/LLDBLog.h" #include "lldb/Utility/Log.h" +#include "llvm/ADT/ScopeExit.h" jimingham wrote: True, that. https://github.com/llvm/llvm-project/pull/117252 __

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Aaron Puchert via lldb-commits
aaronpuchert wrote: Looks like this caused build errors, e.g. https://lab.llvm.org/buildbot/#/changes/20131: ``` FAILED: tools/lldb/source/Target/CMakeFiles/lldbTarget.dir/Target.cpp.o [...] /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Target/Target.cpp:27

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

2024-12-10 Thread via lldb-commits
SingleAccretion wrote: > I think that in your case we're limited by the speed of console updates > rather than the progress mutex. Agreed. > If you have some time, I'd be grateful if you could test this patch out. The > thing want the see is whether this completely resolves your issue or if y

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

2024-12-10 Thread David Spickett via lldb-commits
@@ -180,7 +180,8 @@ NativeRegisterContextLinux_arm64::NativeRegisterContextLinux_arm64( std::unique_ptr register_info_up) : NativeRegisterContextRegisterInfo(native_thread, register_info_up.release()), - NativeRegisterContex

[Lldb-commits] [lldb] [lldb][debugserver] Read/write SME registers on arm64 (PR #119171)

2024-12-10 Thread David Spickett via lldb-commits
@@ -312,16 +312,21 @@ struct DNBRegisterValue { uint64_t uint64; float float32; double float64; -int8_t v_sint8[64]; -int16_t v_sint16[32]; -int32_t v_sint32[16]; -int64_t v_sint64[8]; -uint8_t v_uint8[64]; -uint16_t v_uint16[32]; -uint32

[Lldb-commits] [lldb] [lldb][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2024-12-10 Thread Dhruv Srivastava via lldb-commits
https://github.com/DhruvSrivastavaX updated https://github.com/llvm/llvm-project/pull/118160 >From 03a290e9c748540b69ca6df7fa9c4481f9cdd3d0 Mon Sep 17 00:00:00 2001 From: Dhruv-Srivastava Date: Sat, 30 Nov 2024 01:14:15 -0600 Subject: [PATCH 1/5] Added base files for NativeProcess for AIX ---

[Lldb-commits] [lldb] [lldb][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2024-12-10 Thread Dhruv Srivastava via lldb-commits
DhruvSrivastavaX wrote: Addressed your comments in this commit to keep track of the changes. https://github.com/llvm/llvm-project/pull/118160 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lld

[Lldb-commits] [lldb] [lldb][debugserver] Read/write SME registers on arm64 (PR #119171)

2024-12-10 Thread David Spickett via lldb-commits
@@ -0,0 +1,111 @@ +/// BUILT with +///xcrun -sdk macosx.internal clang -mcpu=apple-m4 -g sme.c -o sme + +#include +#include +#include + +void write_sve_regs() { + asm volatile("ptrue p0.b\n\t"); + asm volatile("ptrue p1.h\n\t"); + asm volatile("ptrue p2.s\n\t"); + asm

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

2024-12-10 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][AIX] Header Parsing for XCOFF Object File in AIX (PR #116338)

2024-12-10 Thread Dhruv Srivastava via lldb-commits
@@ -98,9 +98,20 @@ class ObjectFileXCOFF : public lldb_private::ObjectFile { const lldb::ProcessSP &process_sp, lldb::addr_t header_addr); protected: + typedef struct llvm::object::XCOFFFileHeader64 xcoff_header_t; + + typedef struct llvm::object::XCOFFAuxi

[Lldb-commits] [lldb] [lldb][AIX] Header Parsing for XCOFF Object File in AIX (PR #116338)

2024-12-10 Thread Dhruv Srivastava via lldb-commits
@@ -136,13 +169,42 @@ bool ObjectFileXCOFF::MagicBytesMatch(DataBufferSP &data_sp, return XCOFFHeaderSizeFromMagic(magic) != 0; } -bool ObjectFileXCOFF::ParseHeader() { return false; } +bool ObjectFileXCOFF::ParseHeader() { + + bool retVal = false; + ModuleSP module_sp(Ge

[Lldb-commits] [lldb] [lldb][debugserver] Read/write SME registers on arm64 (PR #119171)

2024-12-10 Thread David Spickett via lldb-commits
@@ -93,6 +93,55 @@ DNBArchMachARM64::SoftwareBreakpointOpcode(nub_size_t byte_size) { uint32_t DNBArchMachARM64::GetCPUType() { return CPU_TYPE_ARM64; } +static std::once_flag g_cpu_has_sme_once; +bool DNBArchMachARM64::CPUHasSME() { + static bool g_has_sme = false; + std:

[Lldb-commits] [lldb] [lldb][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2024-12-10 Thread Dhruv Srivastava via lldb-commits
@@ -0,0 +1,248 @@ +//===-- NativeProcessAIX.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: Apach

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

2024-12-10 Thread 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-10 Thread via lldb-commits
wangleiat wrote: > This passed all tests. Some remaining cosmetic issues but otherwise looks > good. > > We could go more into the style issues here but > > 1. This code was like that before, you just moved it, so it's not actually a > regression. > 2. I don't want to get into refactoring and

[Lldb-commits] [lldb] c00a708 - [lldb] Eliminate dead code (NFC)

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

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -1265,14 +1280,11 @@ Status ProcessGDBRemote::DoResume() { } else continue_packet_error = true; -if (continue_packet_error) { +if (direction == RunDirection::eRunForward && continue_packet_error) { // Either no vCont support, or we tried to use part

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -1363,9 +1375,51 @@ Status ProcessGDBRemote::DoResume() { } } +if (direction == RunDirection::eRunReverse && continue_packet_error) { jimingham wrote: Why do you care about continue_packet_error here? That was being manipulated by the code

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -1363,9 +1375,51 @@ Status ProcessGDBRemote::DoResume() { } } +if (direction == RunDirection::eRunReverse && continue_packet_error) { + if (num_continue_C_tids > 0 || num_continue_S_tids > 0) { +LLDB_LOGF(log, + "ProcessGDBRemote:

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -1363,9 +1375,51 @@ Status ProcessGDBRemote::DoResume() { } } +if (direction == RunDirection::eRunReverse && continue_packet_error) { + if (num_continue_C_tids > 0 || num_continue_S_tids > 0) { +LLDB_LOGF(log, + "ProcessGDBRemote:

[Lldb-commits] [lldb] [lldb] Implement a formatter bytecode interpreter in C++ (PR #114333)

2024-12-10 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: @dyung https://lab.llvm.org/buildbot/#/builders/181/builds/10131 is green again, too. https://github.com/llvm/llvm-project/pull/114333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -2318,6 +2376,8 @@ StateType ProcessGDBRemote::SetThreadStopInfo(StringExtractor &stop_packet) { description = std::string(ostr.GetString()); } else if (key.compare("swbreak") == 0 || key.compare("hwbreak") == 0) { reason = "breakpoint"; + } else

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -182,10 +182,16 @@ void ScriptedProcess::DidResume() { m_pid = GetInterface().GetProcessID(); } -Status ScriptedProcess::DoResume() { +Status ScriptedProcess::DoResume(RunDirection direction) { LLDB_LOGF(GetLog(LLDBLog::Process), "ScriptedProcess::%s resuming process",

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -3239,6 +3241,14 @@ Status Process::ConnectRemote(llvm::StringRef remote_url) { return error; } +void Process::SetRunDirection(RunDirection direction) { + if (m_base_direction == direction) { +return; + } + m_thread_list.DiscardThreadPlans(); jimi

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -3265,18 +3275,25 @@ Status Process::PrivateResume() { // (suspended/running/stepping). Threads should also check their resume // signal in lldb::Thread::GetResumeSignal() to see if they are supposed to // start back up with a signal. -if (m_thread_list.WillR

[Lldb-commits] [clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2024-12-10 Thread Chuanqi Xu via lldb-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/119333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 20e9049 - [Serialization] Support loading template specializations lazily (#119333)

2024-12-10 Thread via lldb-commits
Author: Chuanqi Xu Date: 2024-12-11T09:40:47+08:00 New Revision: 20e904950967c125abc1e91f57e5a373987ff016 URL: https://github.com/llvm/llvm-project/commit/20e904950967c125abc1e91f57e5a373987ff016 DIFF: https://github.com/llvm/llvm-project/commit/20e904950967c125abc1e91f57e5a373987ff016.diff LO

[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)

2024-12-10 Thread via lldb-commits
@@ -617,25 +617,26 @@ void Thread::WillStop() { current_plan->WillStop(); } -void Thread::SetupForResume() { +bool Thread::StepOverBreakpointIfNeeded(RunDirection direction) { jimingham wrote: That name no longer describes what this function does. It checks

[Lldb-commits] [clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2024-12-10 Thread Chuanqi Xu via lldb-commits
ChuanqiXu9 wrote: Thanks. Given the change in lldb is trivial, I'd like to land it to see what happens. https://github.com/llvm/llvm-project/pull/119333 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

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

2024-12-10 Thread via lldb-commits
https://github.com/wangleiat updated https://github.com/llvm/llvm-project/pull/118043 >From a7cba7ef089a6f2004b1879d30675652729370e5 Mon Sep 17 00:00:00 2001 From: wanglei Date: Fri, 29 Nov 2024 10:43:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8

  1   2   >