[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Michael Buch via lldb-commits
@@ -0,0 +1,43 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class LibCxxStdFunctionRecognizerTestCase(TestBase): +NO_DEBUG_INFO_TESTCASE = True + +@add_test_categories(["libc++"]) +

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Michael Buch via lldb-commits
@@ -0,0 +1,43 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class LibCxxStdFunctionRecognizerTestCase(TestBase): +NO_DEBUG_INFO_TESTCASE = True + +@add_test_categories(["libc++"]) +

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Michael Buch via lldb-commits
@@ -53,10 +54,39 @@ class LibCXXFrameRecognizer : public StackFrameRecognizer { public: LibCXXFrameRecognizer() - : m_hidden_function_regex( -R"(^std::__.*::(__function.*::operator\(\)|__invoke))" -R"((\[.*\])?)"// ABI tag. -R"((

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Michael Buch via lldb-commits
@@ -0,0 +1,40 @@ +#include +#include + +void print_num(int i) { + // break here + std::cout << i << '\n'; Michael137 wrote: no need to print to `std::cout` anywhere in the test imo. Also, we usually try to avoid breakpoints on comments. So wrapping them in s

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Michael Buch via lldb-commits
@@ -305,7 +307,9 @@ def test_frame_recognizer_target_specific(self): self.expect( "frame recognizer list", -substrs=["recognizer.MyFrameRecognizer, module a.out, symbol bar"], +substrs=[ +"recognizer.MyFrameRecognizer

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Michael Buch via lldb-commits
@@ -196,8 +197,8 @@ AbortWithPayloadFrameRecognizer::RecognizeFrame(lldb::StackFrameSP frame_sp) { abort_dict_sp->AddStringItem(reason_key, reason_string); abort_dict_sp->AddIntegerItem(flags_key, flags_val); - // This will overwrite the abort_with_payload information in

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Michael Buch via lldb-commits
@@ -0,0 +1,43 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class LibCxxStdFunctionRecognizerTestCase(TestBase): +NO_DEBUG_INFO_TESTCASE = True + +@add_test_categories(["libc++"]) +

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Michael Buch via lldb-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/105695 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. LGTM (with some minor comments). I'd wait for @adrian-prantl to also review this https://github.com/llvm/llvm-project/pull/105695 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https:

[Lldb-commits] [lldb] Add logs for SymbolFileDWARF::FindTypes (PR #106030)

2024-08-25 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. I found this useful in the past, so LGTM, thanks! We also seem to have lost the counterpart log message which tells us whether we found something or not: ``` GetObjectFile()->GetModule()->LogMessage( log, "Sym

[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: I updated https://github.com/llvm/llvm-project/pull/105695 and locally verified that it now fixes the test case for libc++ ABI v2 https://github.com/llvm/llvm-project/pull/104523 ___ lldb-commits mailing list lldb-commits@lists.llv

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From e90463e8967c2019e220b063ed4ce73cd0172bf3 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/4] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From e90463e8967c2019e220b063ed4ce73cd0172bf3 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/3] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From e90463e8967c2019e220b063ed4ce73cd0172bf3 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/3] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Petr Hosek via lldb-commits
https://github.com/petrhosek edited https://github.com/llvm/llvm-project/pull/105695 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Petr Hosek via lldb-commits
@@ -53,10 +54,32 @@ class LibCXXFrameRecognizer : public StackFrameRecognizer { public: LibCXXFrameRecognizer() - : m_hidden_function_regex( -R"(^std::__1::(__function.*::operator\(\)|__invoke))" -R"((\[.*\])?)"// ABI tag. -R"(( c

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/105695 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)

2024-08-25 Thread Petr Hosek via lldb-commits
petrhosek wrote: > Would be interesting if this is fixed by #105695. How can I run the test > cases against libc++'s unstable ABI locally? Set `-D LIBCXX_ABI_VERSION=2` in your CMake invocation. https://github.com/llvm/llvm-project/pull/104523 ___ ll

[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)

2024-08-25 Thread Petr Hosek via lldb-commits
petrhosek wrote: Looks like libc++ uses a different layout for `std::function` with ABI v1 and v2, see https://github.com/llvm/llvm-project/blob/52ae891036e3ab1f668eb103c46ca57257901c6b/libcxx/include/__functional/function.h#L827-L831. https://github.com/llvm/llvm-project/pull/104523 _

[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: Would be interesting if this is fixed by #105695. How can I run the test cases against libc++'s unstable ABI locally? https://github.com/llvm/llvm-project/pull/104523 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https:

[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)

2024-08-25 Thread Petr Hosek via lldb-commits
petrhosek wrote: I attempted a fix forward in https://github.com/llvm/llvm-project/commit/68a1593a59c3d50aff43ef4f82ded224fc6a25db but the test is still failing, although with a slightly different error now: ``` == FAIL: test_b

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From e90463e8967c2019e220b063ed4ce73cd0172bf3 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/4] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From 19b4370c240cfcf4a57a5c38a64c8ba933d8102c Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/5] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [lldb] [lldb] unique_ptr-ify some GetUserExpression APIs. (PR #106034)

2024-08-25 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Lang Hames (lhames) Changes These methods already returned a uniquely owned object, this just makes them self-documenting. --- Full diff: https://github.com/llvm/llvm-project/pull/106034.diff 7 Files Affected: - (modified) lldb/include/

[Lldb-commits] [lldb] [lldb] unique_ptr-ify some GetUserExpression APIs. (PR #106034)

2024-08-25 Thread Lang Hames via lldb-commits
https://github.com/lhames created https://github.com/llvm/llvm-project/pull/106034 These methods already returned a uniquely owned object, this just makes them self-documenting. >From b115f38e01488e0622f5ab1d064b873f9459efeb Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 26 Aug 2024 13:

[Lldb-commits] [lldb] Add logs for SymbolFileDWARF::FindTypes (PR #106030)

2024-08-25 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Dmitrii Galimzianov (DmT021) Changes `SymbolFileDWARF::FindTypes` was logged prior to [this commit](https://github.com/llvm/llvm-project/commit/dd9587795811ba21e6ca6ad52b4531e17e6babd6#diff-edef3a65d5d569bbb75a4158d35b827aa5d42ee03ccd3b0c1d

[Lldb-commits] [lldb] Add logs for SymbolFileDWARF::FindTypes (PR #106030)

2024-08-25 Thread Dmitrii Galimzianov via lldb-commits
DmT021 wrote: @augusto2112 @clayborg please take a look https://github.com/llvm/llvm-project/pull/106030 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add logs for SymbolFileDWARF::FindTypes (PR #106030)

2024-08-25 Thread Dmitrii Galimzianov via lldb-commits
https://github.com/DmT021 ready_for_review https://github.com/llvm/llvm-project/pull/106030 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Add logs for SymbolFileDWARF::FindTypes (PR #106030)

2024-08-25 Thread via lldb-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[Lldb-commits] [lldb] Add logs for SymbolFileDWARF::FindTypes (PR #106030)

2024-08-25 Thread Dmitrii Galimzianov via lldb-commits
https://github.com/DmT021 created https://github.com/llvm/llvm-project/pull/106030 `SymbolFileDWARF::FindTypes` was logged prior to [this commit](https://github.com/llvm/llvm-project/commit/dd9587795811ba21e6ca6ad52b4531e17e6babd6#diff-edef3a65d5d569bbb75a4158d35b827aa5d42ee03ccd3b0c1d4f354afa1

[Lldb-commits] [lldb] 68a1593 - [lldb] Support non-default libc++ ABI namespace

2024-08-25 Thread Petr Hosek via lldb-commits
Author: Petr Hosek Date: 2024-08-26T01:23:09Z New Revision: 68a1593a59c3d50aff43ef4f82ded224fc6a25db URL: https://github.com/llvm/llvm-project/commit/68a1593a59c3d50aff43ef4f82ded224fc6a25db DIFF: https://github.com/llvm/llvm-project/commit/68a1593a59c3d50aff43ef4f82ded224fc6a25db.diff LOG: [l

[Lldb-commits] [lldb] [lldb] Extend frame recognizers to hide frames from backtraces (PR #104523)

2024-08-25 Thread Petr Hosek via lldb-commits
petrhosek wrote: > I reverted the reverts and pushed two commits to fix the missing > initialization. The libc++ issue I described earlier still hasn't been addressed so I'm going to revert the changes again... https://github.com/llvm/llvm-project/pull/104523 _

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From 19b4370c240cfcf4a57a5c38a64c8ba933d8102c Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/4] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From 19b4370c240cfcf4a57a5c38a64c8ba933d8102c Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/4] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From 19b4370c240cfcf4a57a5c38a64c8ba933d8102c Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/4] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From 19b4370c240cfcf4a57a5c38a64c8ba933d8102c Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/4] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/105695 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/105695 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
@@ -53,10 +54,32 @@ class LibCXXFrameRecognizer : public StackFrameRecognizer { public: LibCXXFrameRecognizer() - : m_hidden_function_regex( -R"(^std::__1::(__function.*::operator\(\)|__invoke))" -R"((\[.*\])?)"// ABI tag. -R"(( c

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
@@ -1049,7 +1049,7 @@ let Command = "thread backtrace" in { def thread_backtrace_extended : Option<"extended", "e">, Group<1>, Arg<"Boolean">, Desc<"Show the extended backtrace, if available">; def thread_backtrace_unfiltered : Option<"unfiltered", "u">, Group<1>, - Desc

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
@@ -145,6 +167,17 @@ StackFrameRecognizerManager::GetRecognizerForFrame(StackFrameSP frame) { if (!entry.module_regexp->Execute(module_name.GetStringRef())) continue; +ConstString function_name = [&]() { + switch (entry.mangling_preference) { + cas

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From 19b4370c240cfcf4a57a5c38a64c8ba933d8102c Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/4] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 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 675c748bb606d75a959481e6014299849cf3094c 32786ae0abb7c465dfab602b1d53da11dd1dc7a7 --e

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 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 675c748bb606d75a959481e6014299849cf3094c...32786ae0abb7c465dfab602b1d53da11dd1dc7a7 lldb/

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
@@ -145,6 +167,17 @@ StackFrameRecognizerManager::GetRecognizerForFrame(StackFrameSP frame) { if (!entry.module_regexp->Execute(module_name.GetStringRef())) continue; +ConstString function_name = [&]() { + switch (entry.mangling_preference) { + cas

[Lldb-commits] [lldb] [lldb] Add frame recognizers for libc++ `std::invoke` (PR #105695)

2024-08-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/105695 >From 19b4370c240cfcf4a57a5c38a64c8ba933d8102c Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Thu, 22 Aug 2024 10:50:13 + Subject: [PATCH 1/3] [lldb-dap] Add frame recognizers for libc++ `std:

[Lldb-commits] [clang] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] python: use raw strings for regex (PR #105990)

2024-08-25 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paul Zander (negril) Changes Changed in python version 3.12: A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+\. \d+") now emits a

[Lldb-commits] [clang] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] python: use raw strings for regex (PR #105990)

2024-08-25 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Paul Zander (negril) Changes Changed in python version 3.12: A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+\. \d+") now emits

[Lldb-commits] [clang] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] python: use raw strings for regex (PR #105990)

2024-08-25 Thread via lldb-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[Lldb-commits] [lldb] 2847020 - [lldb][TypeSystemClang][NFC] Log failure to InitBuiltinTypes

2024-08-25 Thread Michael Buch via lldb-commits
Author: Michael Buch Date: 2024-08-25T10:08:45+01:00 New Revision: 2847020dbd9b8f932ee564651ec72ce15fa37d07 URL: https://github.com/llvm/llvm-project/commit/2847020dbd9b8f932ee564651ec72ce15fa37d07 DIFF: https://github.com/llvm/llvm-project/commit/2847020dbd9b8f932ee564651ec72ce15fa37d07.diff