[Lldb-commits] [lldb] [AMDGPU] Add encoding/decoding support for non-result-returning ATOMIC_CSUB instructions (PR #68197)

2023-10-10 Thread Stephen Thomas via lldb-commits
https://github.com/stepthomas closed https://github.com/llvm/llvm-project/pull/68197 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/68452 >From 6d8f61115b159cdf4d00135a76b88b7848dc4103 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 5 Oct 2023 14:22:35 -1000 Subject: [PATCH] [lldb] Update the `po` alias to print Fix-Its to the console.

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/68452 >From 60dbef776988d89bbf59ae1aa6e4d2b404881b43 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 5 Oct 2023 14:22:35 -1000 Subject: [PATCH] [lldb] Update the `po` alias to print Fix-Its to the console.

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
@@ -0,0 +1,27 @@ +""" +Tests whether the do-what-I-mean (DWIM) print `po` alias applies FixIts like `expr` does +""" +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class CPP_DWIM_Fixit_TestCas

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
@@ -173,7 +173,16 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command, auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope(); ValueObjectSP valobj_sp; ExpressionResults expr_result = -target.EvaluateExpression(expr, exe_scope, valobj_sp, eval_op

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/68452 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/68452 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
@@ -173,7 +173,16 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command, auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope(); ValueObjectSP valobj_sp; ExpressionResults expr_result = -target.EvaluateExpression(expr, exe_scope, valobj_sp, eval_op

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Vlad Serebrennikov via lldb-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/68705 This patch adds a `SBType::FindNestedType(name)` function which performs a non-recursive search in given class for a type with specified name. The intent is to perform a fast search in debug info, so that it can

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Vlad Serebrennikov (Endilll) Changes This patch adds a `SBType::FindNestedType(name)` function which performs a non-recursive search in given class for a type with specified name. The intent is to perform a fast search in debug info, so th

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-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 7d4cd47e242c28c450c1e2a1a9f4bd4b7b5a01ab ca4d1bbdeb4ea541199e3db3518b35eb2d5a8cad --

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Vlad Serebrennikov via lldb-commits
Endilll wrote: Intended usage is going to look like the following for `PointerIntPair`: ```python class PointerIntPairProvider: def update(self): pointer_info = self.valobj.type.template_args[4] # PointerIntPairInfo masks = pointer_info.FindNestedType("MaskAndShiftConstants")

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Vlad Serebrennikov via lldb-commits
Endilll wrote: It should be noted that after calling `FindNestedType` and successfully finding `MaskAndShiftConstants` in the example above, the following routine in my fork reports that `PointerIntPairInfo` has 2 enums instead of 1: ```cpp uint32_t TypeSystemClang::GetNumMemberEnums(lldb::opaq

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread via lldb-commits
jimingham wrote: The idea seems good. If you are looking for a type and you know it is defined inside another type, then providing a way for you to tell lldb that is useful. Is FindNestedType guaranteed to have a single return? What if I had: class A { class B { class D { };

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Vlad Serebrennikov via lldb-commits
Endilll wrote: > Is FindNestedType guaranteed to have a single return? Yes, because search is not recursive, i.e. doesn't search inside nested types. I'm intentionally specifying `FindNestedType` this way, because I'd like it to not do too much to remain fast by design, and I'm yet to see a use

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

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

[Lldb-commits] [lldb] [lldb][DataFormatter] unordered_map: account for new libc++ __hash_node layout (PR #68574)

2023-10-10 Thread Alex Langford via lldb-commits
@@ -162,10 +162,21 @@ lldb::ValueObjectSP lldb_private::formatters:: if (!node_sp || error.Fail()) return nullptr; - value_sp = node_sp->GetChildMemberWithName("__value_"); hash_sp = node_sp->GetChildMemberWithName("__hash_"); - if (!value_sp |

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread via lldb-commits
jimingham wrote: Not sure why you say "SBTarget::FindFirstType" is a replacement for the deeper search, since it will search the whole type landscape which is what your search allows us to avoid... You could make this API more general by adding a "depth" parameter: SBType::FindNestedTypes(con

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Vlad Serebrennikov via lldb-commits
Endilll wrote: `depth` parameter makes sense to me. I wonder if it should have a default value 0 meaning infinite depth. Now I wonder how my current implementation behaves with respect to depth, which is actually embarrassing. And how to implement `depth` parameter. https://github.com/llvm/ll

[Lldb-commits] [lldb] [lldb][DataFormatter] unordered_map: account for new libc++ __hash_node layout (PR #68574)

2023-10-10 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/68574 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread via lldb-commits
jimingham wrote: 0 to mean unlimited search sounds good to me. https://github.com/llvm/llvm-project/pull/68705 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Alex Langford via lldb-commits
@@ -586,6 +586,15 @@ lldb::TemplateArgumentKind SBType::GetTemplateArgumentKind(uint32_t idx) { return eTemplateArgumentKindNull; } +SBType SBType::FindNestedType(const char *name) { + LLDB_INSTRUMENT_VA(this); bulbazord wrote: `name` needs to be in the i

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Alex Langford via lldb-commits
@@ -1082,6 +1082,19 @@ bool TypeImpl::GetDescription(lldb_private::Stream &strm, return true; } +CompilerType TypeImpl::FindNestedType(ConstString name) { + auto type_system = GetTypeSystem(false); + auto *symbol_file = type_system->GetSymbolFile(); + auto decl_context =

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Alex Langford via lldb-commits
@@ -1082,6 +1082,19 @@ bool TypeImpl::GetDescription(lldb_private::Stream &strm, return true; } +CompilerType TypeImpl::FindNestedType(ConstString name) { + auto type_system = GetTypeSystem(false); bulbazord wrote: Can you add an inline comment for this fa

[Lldb-commits] [lldb] 606f89a - [lldb] Fix `po` alias by printing fix-its to the console. (#68452)

2023-10-10 Thread via lldb-commits
Author: Pete Lawrence Date: 2023-10-10T13:59:58-07:00 New Revision: 606f89ab7d537ca068fb1be9fd89d96a30de38f8 URL: https://github.com/llvm/llvm-project/commit/606f89ab7d537ca068fb1be9fd89d96a30de38f8 DIFF: https://github.com/llvm/llvm-project/commit/606f89ab7d537ca068fb1be9fd89d96a30de38f8.diff

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

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

[Lldb-commits] [lldb] 2e59b75 - Revert "[lldb] Fix `po` alias by printing fix-its to the console. (#68452)"

2023-10-10 Thread Adrian Prantl via lldb-commits
Author: Adrian Prantl Date: 2023-10-10T14:56:00-07:00 New Revision: 2e59b7550e3678a10be1a26f651488fc665a1f09 URL: https://github.com/llvm/llvm-project/commit/2e59b7550e3678a10be1a26f651488fc665a1f09 DIFF: https://github.com/llvm/llvm-project/commit/2e59b7550e3678a10be1a26f651488fc665a1f09.diff

[Lldb-commits] [lldb] [lldb-vscode] Update installation instructions (PR #68234)

2023-10-10 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: FWIW I ran into the same issue and ended up using [these instructions](https://code.visualstudio.com/api/working-with-extensions/publishing-extension). https://github.com/llvm/llvm-project/pull/68234 ___ lldb-commits mailing list l

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68755)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/68755 The `po` alias now matches the behavior of the `expression` command when the it can apply a Fix-It to an expression. Modifications - Add has `m_fixed_expression` to the `CommandObjectDWIMPrint` class a `prot

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68755)

2023-10-10 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Pete Lawrence (PortalPete) Changes The `po` alias now matches the behavior of the `expression` command when the it can apply a Fix-It to an expression. Modifications - Add has `m_fixed_expression` to the `CommandObjectDWIMPrint` class a `

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68755)

2023-10-10 Thread via lldb-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 4df74963ea0f6c8650d5837ab52e3cdcf1dcf016..ee8e9b698edac7c44d77441a86844f94b045b9d1 lldb/t

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68755)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/68755 >From 5d48fc34f1ae2fcbbf24294e10aab4152c865221 Mon Sep 17 00:00:00 2001 From: Pete Lawrence <34425917+portalp...@users.noreply.github.com> Date: Tue, 10 Oct 2023 10:59:58 -1000 Subject: [PATCH] [lldb] Fix `po`

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Vlad Serebrennikov via lldb-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/68705 >From ca4d1bbdeb4ea541199e3db3518b35eb2d5a8cad Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 10 Oct 2023 15:07:56 +0300 Subject: [PATCH 1/3] [lldb] Add SBType::FindNestedType() function --- lldb/

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Vlad Serebrennikov via lldb-commits
@@ -1082,6 +1082,19 @@ bool TypeImpl::GetDescription(lldb_private::Stream &strm, return true; } +CompilerType TypeImpl::FindNestedType(ConstString name) { + auto type_system = GetTypeSystem(false); Endilll wrote: Done! https://github.com/llvm/llvm-project

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Vlad Serebrennikov via lldb-commits
@@ -1082,6 +1082,19 @@ bool TypeImpl::GetDescription(lldb_private::Stream &strm, return true; } +CompilerType TypeImpl::FindNestedType(ConstString name) { + auto type_system = GetTypeSystem(false); + auto *symbol_file = type_system->GetSymbolFile(); + auto decl_context =

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Vlad Serebrennikov via lldb-commits
@@ -586,6 +586,15 @@ lldb::TemplateArgumentKind SBType::GetTemplateArgumentKind(uint32_t idx) { return eTemplateArgumentKindNull; } +SBType SBType::FindNestedType(const char *name) { + LLDB_INSTRUMENT_VA(this); Endilll wrote: I didn't knew this. Thank you

[Lldb-commits] [lldb] a9d5056 - Use llvm::endianness (NFC)

2023-10-10 Thread Kazu Hirata via lldb-commits
Author: Kazu Hirata Date: 2023-10-10T21:54:15-07:00 New Revision: a9d50568625e4f2e021d6229f8c1c721a3d82d51 URL: https://github.com/llvm/llvm-project/commit/a9d50568625e4f2e021d6229f8c1c721a3d82d51 DIFF: https://github.com/llvm/llvm-project/commit/a9d50568625e4f2e021d6229f8c1c721a3d82d51.diff L

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Med Ismail Bennani via lldb-commits
@@ -586,6 +586,15 @@ lldb::TemplateArgumentKind SBType::GetTemplateArgumentKind(uint32_t idx) { return eTemplateArgumentKindNull; } +SBType SBType::FindNestedType(const char *name) { + LLDB_INSTRUMENT_VA(this); + + if (!IsValid()) +return SBType(); + auto ret = SBTyp

[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

2023-10-10 Thread Med Ismail Bennani via lldb-commits
@@ -313,6 +313,8 @@ class TypeImpl { bool GetDescription(lldb_private::Stream &strm, lldb::DescriptionLevel description_level); + CompilerType FindNestedType(ConstString name); medismailben wrote: Do we want to make a `ConstString` fo

[Lldb-commits] [lldb] b888592 - Use llvm::endianness::{big, little, native} (NFC)

2023-10-10 Thread Kazu Hirata via lldb-commits
Author: Kazu Hirata Date: 2023-10-10T22:54:51-07:00 New Revision: b8885926f8115d5fe2c06907e066cae061d5f230 URL: https://github.com/llvm/llvm-project/commit/b8885926f8115d5fe2c06907e066cae061d5f230 DIFF: https://github.com/llvm/llvm-project/commit/b8885926f8115d5fe2c06907e066cae061d5f230.diff L

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68755)

2023-10-10 Thread Med Ismail Bennani via lldb-commits
medismailben wrote: LGTM overall. I think you can make the test less redundant by using the same source file & Makefile for both tests. https://github.com/llvm/llvm-project/pull/68755 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://l

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68755)

2023-10-10 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben approved this pull request. https://github.com/llvm/llvm-project/pull/68755 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits