[Lldb-commits] [lldb] Replace ArchSpec::PiecewiseCompare() with Triple::operator==() (PR #82804)

2024-02-23 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/82804 Looking ast the definition of both functions this is *almost* an NFC change, except that Triple also looks at the SubArch (important) and ObjectFormat (less so). This fixes a bug that only manifests with

[Lldb-commits] [lldb] Replace ArchSpec::PiecewiseCompare() with Triple::operator==() (PR #82804)

2024-02-23 Thread Adrian Prantl via lldb-commits
@@ -0,0 +1,25 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class TestArm64eAttach(TestBase): +NO_DEBUG_INFO_TESTCASE = True + +# On Darwin systems, arch arm64e means ARMv8.3 with p

[Lldb-commits] [lldb] Replace ArchSpec::PiecewiseCompare() with Triple::operator==() (PR #82804)

2024-02-23 Thread Adrian Prantl via lldb-commits
@@ -0,0 +1,2 @@ +C_SOURCES := main.c +include Makefile.rules adrian-prantl wrote: That is implicit. If you are running the tests with an arm64e ARCH, the test will run (with that triple). https://github.com/llvm/llvm-project/pull/82804 _

[Lldb-commits] [lldb] [lldb][X86] Fix setting target features in ClangExpressionParser (PR #82364)

2024-02-23 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: Would this change be observable by a test? https://github.com/llvm/llvm-project/pull/82364 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Replace ArchSpec::PiecewiseCompare() with Triple::operator==() (PR #82804)

2024-02-23 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/82804 >From d8e201683c460af42b671ecb433ba84620ada1c2 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 23 Feb 2024 09:58:17 -0800 Subject: [PATCH] Replace ArchSpec::PiecewiseCompare() with Triple::operator

[Lldb-commits] [lldb] Replace ArchSpec::PiecewiseCompare() with Triple::operator==() (PR #82804)

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

[Lldb-commits] [lldb] 3f91bdf - Revert "Replace ArchSpec::PiecewiseCompare() with Triple::operator==()"

2024-02-23 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-02-23T15:26:14-08:00 New Revision: 3f91bdfdd50aa4eaf1d3e49cf797220cfeccaf16 URL: https://github.com/llvm/llvm-project/commit/3f91bdfdd50aa4eaf1d3e49cf797220cfeccaf16 DIFF: https://github.com/llvm/llvm-project/commit/3f91bdfdd50aa4eaf1d3e49cf797220cfeccaf16.diff

[Lldb-commits] [lldb] Change debugserver to report the cpu(sub)type of process, not the host. (PR #82938)

2024-02-25 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/82938 This reapplies [Replace ArchSpec::PiecewiseCompare() with Triple::operator==()](https://github.com/llvm/llvm-project/commit/5c9e53d45ba948b8a5e8416aa9b3322c87fc46c8), with an additional fix in debugserver.

[Lldb-commits] [lldb] Change debugserver to report the cpu(sub)type of process, not the host. (PR #82938)

2024-02-25 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/82938 >From 5c9e53d45ba948b8a5e8416aa9b3322c87fc46c8 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 23 Feb 2024 09:58:17 -0800 Subject: [PATCH 1/2] Replace ArchSpec::PiecewiseCompare() with Triple::oper

[Lldb-commits] [lldb] Change debugserver to report the cpu(sub)type of process, not the host. (PR #82938)

2024-02-26 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: > Overall this looks good but we should verify that this doesn't regress > running unmodified iOS binaries on macOS (https://reviews.llvm.org/D117340, > https://reviews.llvm.org/D121444). It was really tricky to get that right and > it's all based on the binary and host tr

[Lldb-commits] [lldb] Change debugserver to report the cpu(sub)type of process, not the host. (PR #82938)

2024-02-26 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/82938 >From 5c9e53d45ba948b8a5e8416aa9b3322c87fc46c8 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 23 Feb 2024 09:58:17 -0800 Subject: [PATCH 1/2] Replace ArchSpec::PiecewiseCompare() with Triple::oper

[Lldb-commits] [lldb] Change debugserver to report the cpu(sub)type of process, not the host. (PR #82938)

2024-02-26 Thread Adrian Prantl via lldb-commits
@@ -26,3 +31,8 @@ def test(self): "target triple is updated correctly") error = process.Kill() self.assertSuccess(error) + +# Test debugserver behavior. +self.filecheck('platform shell cat "%s"' % packets, __file__) +

[Lldb-commits] [lldb] 01450dd - Change debugserver to report the cpu(sub)type of process, not the host.

2024-02-26 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-02-26T09:57:07-08:00 New Revision: 01450dd1c69d1edb0d01159352a56c99988839f4 URL: https://github.com/llvm/llvm-project/commit/01450dd1c69d1edb0d01159352a56c99988839f4 DIFF: https://github.com/llvm/llvm-project/commit/01450dd1c69d1edb0d01159352a56c99988839f4.diff

[Lldb-commits] [lldb] f9f3316 - Replace ArchSpec::PiecewiseCompare() with Triple::operator==()

2024-02-26 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-02-26T09:57:07-08:00 New Revision: f9f331652d4f0aff9ece3570abe8c686cdfefff4 URL: https://github.com/llvm/llvm-project/commit/f9f331652d4f0aff9ece3570abe8c686cdfefff4 DIFF: https://github.com/llvm/llvm-project/commit/f9f331652d4f0aff9ece3570abe8c686cdfefff4.diff

[Lldb-commits] [lldb] Change debugserver to report the cpu(sub)type of process, not the host. (PR #82938)

2024-02-26 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: I also tested this with a rosetta process. https://github.com/llvm/llvm-project/pull/82938 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Change debugserver to report the cpu(sub)type of process, not the host. (PR #82938)

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

[Lldb-commits] [lldb] Change debugserver to report the cpu(sub)type of process, not the host. (PR #82938)

2024-02-26 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: Landed in 01450dd1c69d1edb0d01159352a56c99988839f4 f9f331652d4f0aff9ece3570abe8c686cdfefff4 https://github.com/llvm/llvm-project/pull/82938 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[Lldb-commits] [lldb] Aim debugserver workaround more precisely. (PR #83099)

2024-02-26 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/83099 None >From 1b020afcb50cd6059bbe2ab26779ed6d3e7c2f7a Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 26 Feb 2024 18:43:57 -0800 Subject: [PATCH] Aim debugserver workaround more precisely. --- .../

[Lldb-commits] [lldb] Aim debugserver workaround more precisely. (PR #83099)

2024-02-26 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/83099 >From f26292e7db372380fab4fd83f9df79a5b8929772 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 26 Feb 2024 18:43:57 -0800 Subject: [PATCH] Aim debugserver workaround more precisely. --- .../gdb-re

[Lldb-commits] [lldb] Aim debugserver workaround more precisely. (PR #83099)

2024-02-26 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/83099 >From 6f74b0bd4cfb3aacf42b9b65a019dba425c7d18e Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 26 Feb 2024 16:50:27 -0800 Subject: [PATCH] Make the workaround for older debugserver versions more na

[Lldb-commits] [lldb] Aim debugserver workaround more precisely. (PR #83099)

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

[Lldb-commits] [lldb] [lldb][NFC] Move helpers to import record layout into ClangASTImporter (PR #83291)

2024-02-29 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/83291 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][NFC] Move helpers to import record layout into ClangASTImporter (PR #83291)

2024-02-29 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/83291 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][NFC] Move helpers to import record layout into ClangASTImporter (PR #83291)

2024-02-29 Thread Adrian Prantl via lldb-commits
@@ -517,6 +520,207 @@ bool ClangASTImporter::CompleteType(const CompilerType &compiler_type) { return false; } +template adrian-prantl wrote: Not your code, but I'm wondering if there's an opportunity here to add a small doxygen comment to the top of the

[Lldb-commits] [lldb] [lldb][ClangASTImporter] Import record layouts from origin if available (PR #83295)

2024-02-29 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/83295 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-02-29 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/83501 In the end this value comes from TypeSystem::GetNumChildren which returns a uint32_t, so ValueObject should be consistent with that. >From 056c198efc3c224cb87edbd8f56344bdbb3e204a Mon Sep 17 00:00:00 2001

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-02-29 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/83501 >From 44e21455e042a674f12f872be24ca9b7bb7d6dec Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Thu, 29 Feb 2024 15:06:28 -0800 Subject: [PATCH 1/2] Change the return type of ValueObject::CalculateNumChi

[Lldb-commits] [lldb] [lldb][X86] Fix setting target features in ClangExpressionParser (PR #82364)

2024-03-01 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: I'll defer to @Michael137 but if he's okay with this, I'm fine with it. https://github.com/llvm/llvm-project/pull/82364 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-01 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: > Why not increase TypeSystem::GetNumChildren to return a size_t instead? We could, but even 2^32 seems like an outrageous amount of children to me. What would be a use-case for this? A ValueObject that has the entire address space as synthetic children? There is other co

[Lldb-commits] [lldb] [lldb][test] Add test for chained PCH debugging (PR #83582)

2024-03-04 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/83582 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][test] Add test for chained PCH debugging (PR #83582)

2024-03-04 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/83582 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][test] Add test for chained PCH debugging (PR #83582)

2024-03-04 Thread Adrian Prantl via lldb-commits
@@ -0,0 +1,10 @@ +include Makefile.rules + +OBJECTS += main.o + +$(EXE): $(BUILDDIR)/main.o + +$(BUILDDIR)/main.o: main.cpp + $(CC) -cc1 -emit-pch -x c++-header -fmodule-format=obj -fmodules -O0 -dwarf-ext-refs -debug-info-kind=standalone $(SRCDIR)/base-pch.h -o base-pch.h

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-04 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: My main point was to unify it, but I have no problem with going for `uint64_t` instead. I'll update the patch. https://github.com/llvm/llvm-project/pull/83501 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-04 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/83501 >From 4aeccd664633af57f12bfb7d0edada78c09a951e Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 4 Mar 2024 16:07:44 -0800 Subject: [PATCH 1/2] Change the return type of ValueObject::CalculateNumChil

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-04 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/83501 >From 4aeccd664633af57f12bfb7d0edada78c09a951e Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 4 Mar 2024 16:07:44 -0800 Subject: [PATCH 1/3] Change the return type of ValueObject::CalculateNumChil

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-04 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: > Looking good. One question: do we want to switch to using a > `std::optional` instead of using a `uint64_t` with a default value > of UINT32_MAX? We should either use the optional or switch everything except > for the public API over to use `UINT64_MAX` The entire point

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-04 Thread Adrian Prantl via lldb-commits
@@ -958,7 +958,7 @@ class ValueObject { int32_t synthetic_index); /// Should only be called by ValueObject::GetNumChildren(). - virtual size_t CalculateNumChildren(uint32_t max = UINT32_MAX) = 0; + virtual uint64_t CalculateNumChil

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-04 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: Folks I'm talking this all back. Changing the return type from a uint32_t to a uint64_t is an all-or-nothing affair, because the UINT32_MAX sentinel value is permeating a bunch of other APIs that I have not intention of changing right now. For example, `GetIndexOfChildWith

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-04 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/83501 >From 44e21455e042a674f12f872be24ca9b7bb7d6dec Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Thu, 29 Feb 2024 15:06:28 -0800 Subject: [PATCH 1/3] Change the return type of ValueObject::CalculateNumChi

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-04 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: So I reverted back to the state where I convert everything to int32_t. This way I don't have to touch the UINT32_MAX sentinels in this patch, which should be done separately and very carefully. https://github.com/llvm/llvm-project/pull/83501 ___

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-05 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: > I would almost vote to change everything to uint64_t except for the public > API since we can't change the API without breaking. Though I winder if we can > actually change this one: @bulbazord I discovered that the idea that these are 32-bit values is deeply baked into

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-05 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: > So the only thing left to here is to stop using UINT32_MAX and switch to > using UINT64_MAX on internal APIs. If the goal is to migrate to 64-bit everywhere, yes. But we'd need to do this on a bunch more APIs. If you feel strongly we need to do this I can do it, but the

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

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

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

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

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

2024-03-06 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: @walter-erquinigo I was wondering if it would make sense to create a DropAndLogError() wrapper for all these places. The main problem would be that we end up calling these functions dozens of times over and over so we'd be spamming the logs quite a bit. But maybe doing a v

[Lldb-commits] [lldb] Report back errors in GetNumChildren() (PR #84265)

2024-03-06 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: ``` Ran command: "v -ptr-depth 1 x" Got output: (Opaque *) x = 0x00018000 ``` https://github.com/llvm/llvm-project/pull/84265 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

2024-03-06 Thread Adrian Prantl via lldb-commits
@@ -451,8 +451,13 @@ bool FormatManager::ShouldPrintAsOneLiner(ValueObject &valobj) { if (valobj.GetSummaryFormat().get() != nullptr) return valobj.GetSummaryFormat()->IsOneLiner(); + auto num_children = valobj.GetNumChildren(); + if (!num_children) { +llvm::consu

[Lldb-commits] [lldb] [lldb] Minor cleanup in StoringDiagnosticConsumer (PR #84263)

2024-03-07 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/84263 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Disable shell tests affected by ld64 bug (PR #84246)

2024-03-07 Thread Adrian Prantl via lldb-commits
@@ -179,3 +180,14 @@ def calculate_arch_features(arch_string): if "LD_PRELOAD" in os.environ: config.available_features.add("ld_preload-present") + adrian-prantl wrote: I guess it fails gracefully, but should this check whether we're on Darwin first? ht

[Lldb-commits] [lldb] [lldb] Don't report all progress event as completed. (PR #84281)

2024-03-07 Thread Adrian Prantl via lldb-commits
@@ -110,20 +110,22 @@ void ProgressManager::Decrement(const Progress::ProgressData &progress_data) { return; if (pos->second.first <= 1) { -ReportProgress(pos->second.second); +ReportProgress(pos->second.second, EventType::End); m_progress_category_map.eras

[Lldb-commits] [lldb] 3d7c5b8 - Change the return type of SyntheticFrontend::CalculateNumChildren to int32_t

2024-03-07 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-03-07T10:55:02-08:00 New Revision: 3d7c5b80e38b01223811eb557a5e9953cfa2154d URL: https://github.com/llvm/llvm-project/commit/3d7c5b80e38b01223811eb557a5e9953cfa2154d DIFF: https://github.com/llvm/llvm-project/commit/3d7c5b80e38b01223811eb557a5e9953cfa2154d.diff

[Lldb-commits] [lldb] 54c955b - Change the return type of ValueObject::CalculateNumChildren to uint32_t.

2024-03-07 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-03-07T10:55:02-08:00 New Revision: 54c955b828bbdcf46586556339cbd3cf8f205b4f URL: https://github.com/llvm/llvm-project/commit/54c955b828bbdcf46586556339cbd3cf8f205b4f DIFF: https://github.com/llvm/llvm-project/commit/54c955b828bbdcf46586556339cbd3cf8f205b4f.diff

[Lldb-commits] [lldb] e710523 - Change GetChildAtIndex to take a uint32_t

2024-03-07 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-03-07T10:55:02-08:00 New Revision: e710523e408ce64c15fddf9f7dbe1248795c20d7 URL: https://github.com/llvm/llvm-project/commit/e710523e408ce64c15fddf9f7dbe1248795c20d7 DIFF: https://github.com/llvm/llvm-project/commit/e710523e408ce64c15fddf9f7dbe1248795c20d7.diff

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

2024-03-07 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: Merged in https://github.com/llvm/llvm-project/commit/e710523e408ce64c15fddf9f7dbe1248795c20d7 https://github.com/llvm/llvm-project/pull/83501 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[Lldb-commits] [lldb] Change the return type of CalculateNumChildren to uint32_t. (PR #83501)

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

[Lldb-commits] [lldb] 7fc583c - Change Get|SetNumChildren to use unint32_t

2024-03-07 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-03-07T10:58:34-08:00 New Revision: 7fc583c9a5ddf447b2b53007778cb034a186d4b5 URL: https://github.com/llvm/llvm-project/commit/7fc583c9a5ddf447b2b53007778cb034a186d4b5 DIFF: https://github.com/llvm/llvm-project/commit/7fc583c9a5ddf447b2b53007778cb034a186d4b5.diff

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

2024-03-07 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: > I would say this differently. Many clients of the GetNumChildren API are > planning to respond the same way to an error and a number of children == 0. I haven't done a complete audit, but my expectation for this patch is that the vast majority of users of this API will

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

2024-03-08 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/84219 >From 97a80ffa93d9fd648f0aa995b51981f0ad949530 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Thu, 7 Mar 2024 13:03:14 -0800 Subject: [PATCH] Let GetNumChildren()/CalculateNumChildren() return llvm::Ex

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

2024-03-08 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: @walter-erquinigo @jimingham I updated the patch to implement Jim's suggestion of adding an explicit `GetNumChilrdrenIgnoringErrors()` API that also ticks off the "big red warning flag" @JDevlieghere was pushing for. https://github.com/llvm/llvm-project/pull/84219

[Lldb-commits] [lldb] Report back errors in GetNumChildren() (PR #84265)

2024-03-08 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: > From looking at the code, it seems like there are two clear classes of users, > those that need to check the error, and those that, in the error case, 0 is > just as good as the error. The latter appears not infrequently as: > > `llvm::expectedToStdOptional(value_sp->Get

[Lldb-commits] [lldb] Report back errors in GetNumChildren() (PR #84265)

2024-03-08 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: Rebased https://github.com/llvm/llvm-project/pull/84265 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

2024-03-08 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/84219 >From 0504cd6b50df6fafe36bade310fe1b729a3d9cea Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Thu, 7 Mar 2024 13:03:14 -0800 Subject: [PATCH] Change GetNumChildren()/CalculateNumChildren() to return ll

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

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

[Lldb-commits] [lldb] Report back errors in GetNumChildren() (PR #84265)

2024-03-08 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/84265 >From 76d65446227d18f4f3c4675b1aa12678037dff8c Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Wed, 6 Mar 2024 16:21:14 -0800 Subject: [PATCH] Report back errors in GetNumChildren() This is a proof-of-c

[Lldb-commits] [lldb] Report back errors in GetNumChildren() (PR #84265)

2024-03-08 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/84265 >From 934ad65f660a43917ec66861127230c68c697743 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 8 Mar 2024 14:46:13 -0800 Subject: [PATCH] Report back errors in GetNumChildren() This is a proof-of-c

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

2024-03-08 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: Apologies, I made a last-minute rebase without rebuilding. Thanks for reverting! https://github.com/llvm/llvm-project/pull/84219 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[Lldb-commits] [lldb] Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (PR #84219)

2024-03-08 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: Or rather, I didn't build with all LLVM targets. https://github.com/llvm/llvm-project/pull/84219 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 624ea68 - Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (#84219)

2024-03-08 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2024-03-08T16:03:04-08:00 New Revision: 624ea68cbc3ce422b3ee110c0c0af839eec2e278 URL: https://github.com/llvm/llvm-project/commit/624ea68cbc3ce422b3ee110c0c0af839eec2e278 DIFF: https://github.com/llvm/llvm-project/commit/624ea68cbc3ce422b3ee110c0c0af839eec2e278.diff

[Lldb-commits] [lldb] Report back errors in GetNumChildren() (PR #84265)

2024-03-08 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/84265 >From 9b02d004a3aec681047d47cb481a269637bdd9fc Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 8 Mar 2024 14:46:13 -0800 Subject: [PATCH] Report back errors in GetNumChildren() This is a proof-of-c

[Lldb-commits] [lldb] Report back errors in GetNumChildren() (PR #84265)

2024-03-08 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/84265 >From 78866b8977b655109d85bd1c231b1659c5c90c8a Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 8 Mar 2024 14:46:13 -0800 Subject: [PATCH] Report back errors in GetNumChildren() This is a proof-of-c

[Lldb-commits] [lldb] Report back errors in GetNumChildren() (PR #84265)

2024-03-08 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: Found two more tests that were (positively) affected by this change! https://github.com/llvm/llvm-project/pull/84265 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-com

[Lldb-commits] [lldb] Report back errors in GetNumChildren() (PR #84265)

2024-03-11 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/84265 >From 18812772780abee17dd106e0e8f8c78ab8d4dbf1 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Fri, 8 Mar 2024 14:46:13 -0800 Subject: [PATCH] Report back errors in GetNumChildren() This is a proof-of-c

[Lldb-commits] [lldb] Report back errors in GetNumChildren() (PR #84265)

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

[Lldb-commits] [lldb] [lldb] Implement coalescing of disjoint progress events (PR #84854)

2024-03-12 Thread Adrian Prantl via lldb-commits
@@ -0,0 +1,88 @@ +//===-- Alarm.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] Implement coalescing of disjoint progress events (PR #84854)

2024-03-12 Thread Adrian Prantl via lldb-commits
@@ -0,0 +1,88 @@ +//===-- Alarm.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] Implement coalescing of disjoint progress events (PR #84854)

2024-03-12 Thread Adrian Prantl via lldb-commits
@@ -146,19 +147,31 @@ class ProgressManager { void Increment(const Progress::ProgressData &); void Decrement(const Progress::ProgressData &); + static void Initialize(); + static void Terminate(); + static bool Enabled(); static ProgressManager &Instance(); -privat

[Lldb-commits] [lldb] [lldb] Implement coalescing of disjoint progress events (PR #84854)

2024-03-12 Thread Adrian Prantl via lldb-commits
@@ -146,19 +147,31 @@ class ProgressManager { void Increment(const Progress::ProgressData &); void Decrement(const Progress::ProgressData &); + static void Initialize(); + static void Terminate(); + static bool Enabled(); static ProgressManager &Instance(); -privat

[Lldb-commits] [lldb] [lldb][test] TestExprCompletion.py: add tests for completion of reserved identifiers (PR #84890)

2024-03-12 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/84890 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Avoid a potential exit(1) in LLVMContext::diagnose() (PR #84992)

2024-03-12 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/84992 by handling *all* errors in IRExecDiagnosticHandler. The function that call this handles all unhandled errors with an `exit(1)`. rdar://124459751 I don't really have a testcase for this, since the crash

[Lldb-commits] [lldb] Avoid a potential exit(1) in LLVMContext::diagnose() (PR #84992)

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

[Lldb-commits] [lldb] [lldb] Implement coalescing of disjoint progress events (PR #84854)

2024-03-14 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/84854 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add an Alarm class for coalescing progress reports (PR #85329)

2024-03-15 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/85329 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add an Alarm class for coalescing progress reports (PR #85329)

2024-03-15 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/85329 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add an Alarm class for coalescing progress reports (PR #85329)

2024-03-15 Thread Adrian Prantl via lldb-commits
@@ -0,0 +1,193 @@ +//===-- Alarm.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] Add an Alarm class for coalescing progress reports (PR #85329)

2024-03-15 Thread Adrian Prantl via lldb-commits
@@ -0,0 +1,164 @@ +//===-- AlarmTest.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] Show module name in progress update for downloading symbols (PR #85342)

2024-03-15 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/85342 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show module name in progress update for downloading symbols (PR #85342)

2024-03-15 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl requested changes to this pull request. https://github.com/llvm/llvm-project/pull/85342 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show module name in progress update for downloading symbols (PR #85342)

2024-03-15 Thread Adrian Prantl via lldb-commits
@@ -1066,11 +1066,21 @@ bool SymbolLocatorDebugSymbols::DownloadObjectAndSymbolFile( command << lookup_arg; // Log and report progress. + std::string lookup_desc; + if (uuid_ptr && file_spec_ptr) +lookup_desc = +llvm::formatv("{0} ({1})", file_spec_ptr->GetF

[Lldb-commits] [lldb] [lldb] Show module name in progress update for downloading symbols (PR #85342)

2024-03-15 Thread Adrian Prantl via lldb-commits
@@ -1066,11 +1066,21 @@ bool SymbolLocatorDebugSymbols::DownloadObjectAndSymbolFile( command << lookup_arg; // Log and report progress. + std::string lookup_desc; + if (uuid_ptr && file_spec_ptr) +lookup_desc = +llvm::formatv("{0} ({1})", file_spec_ptr->GetF

[Lldb-commits] [lldb] [lldb] Show module name in progress update for downloading symbols (PR #85342)

2024-03-15 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/85342 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show module name in progress update for downloading symbols (PR #85342)

2024-03-15 Thread Adrian Prantl via lldb-commits
@@ -1066,11 +1066,21 @@ bool SymbolLocatorDebugSymbols::DownloadObjectAndSymbolFile( command << lookup_arg; // Log and report progress. + std::string lookup_desc; + if (uuid_ptr && file_spec_ptr) +lookup_desc = +llvm::formatv("{0} ({1})", file_spec_ptr->GetF

[Lldb-commits] [lldb] [lldb] Show module name in progress update for downloading symbols (PR #85342)

2024-03-15 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/85342 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Store SupportFile in FileEntry (NFC) (PR #85468)

2024-03-15 Thread Adrian Prantl via lldb-commits
@@ -130,18 +130,27 @@ struct LineEntry { /// Shared pointer to the target this LineEntry belongs to. void ApplyFileMappings(lldb::TargetSP target_sp); - // Member variables. - AddressRange range; ///< The section offset address range for this line entry. - FileSpec

[Lldb-commits] [lldb] [lldb] Store SupportFile in FileEntry (NFC) (PR #85468)

2024-03-15 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/85468 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add register lookup as another fallback computation for address-expressions (PR #85492)

2024-03-15 Thread Adrian Prantl via lldb-commits
@@ -233,24 +235,57 @@ OptionArgParser::DoToAddress(const ExecutionContext *exe_ctx, llvm::StringRef s, // Since the compiler can't handle things like "main + 12" we should try to // do this for now. The compiler doesn't like adding offsets to function // pointer types. +

[Lldb-commits] [lldb] Add register lookup as another fallback computation for address-expressions (PR #85492)

2024-03-15 Thread Adrian Prantl via lldb-commits
@@ -233,24 +235,57 @@ OptionArgParser::DoToAddress(const ExecutionContext *exe_ctx, llvm::StringRef s, // Since the compiler can't handle things like "main + 12" we should try to // do this for now. The compiler doesn't like adding offsets to function // pointer types. +

[Lldb-commits] [lldb] Add register lookup as another fallback computation for address-expressions (PR #85492)

2024-03-15 Thread Adrian Prantl via lldb-commits
@@ -233,24 +235,57 @@ OptionArgParser::DoToAddress(const ExecutionContext *exe_ctx, llvm::StringRef s, // Since the compiler can't handle things like "main + 12" we should try to // do this for now. The compiler doesn't like adding offsets to function // pointer types. +

[Lldb-commits] [lldb] Add register lookup as another fallback computation for address-expressions (PR #85492)

2024-03-15 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: This is going to be incredibly useful, thanks! https://github.com/llvm/llvm-project/pull/85492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add register lookup as another fallback computation for address-expressions (PR #85492)

2024-03-19 Thread Adrian Prantl via lldb-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/85492 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Support custom LLVM formatting for variables (PR #81196)

2024-03-20 Thread Adrian Prantl via lldb-commits
@@ -658,6 +658,33 @@ static char ConvertValueObjectStyleToChar( return '\0'; } +static bool DumpValueWithLLVMFormat(Stream &s, llvm::StringRef options, +ValueObject &target) { + std::string formatted; + std::string llvm_format = ("{0:" +

<    2   3   4   5   6   7   8   9   10   11   >