[Lldb-commits] [lldb] [lldb] Claim to support swbreak and hwbreak packets when debugging a gdbremote (PR #102873)

2024-08-12 Thread via lldb-commits
xusheng6 wrote: > > or do we already have some infra that I can use? > > `lldb/test/API/functionalities/gdb_remote_client/TestStopPCs.py` is an > example of that infrastructure. The `threadStopInfo` is where you would > insert the swbreak hwbreak key. > > In fact, if i386 is an architecture w

[Lldb-commits] [lldb] [lldb] Claim to support swbreak and hwbreak packets when debugging a gdbremote (PR #102873)

2024-08-12 Thread via lldb-commits
https://github.com/xusheng6 updated https://github.com/llvm/llvm-project/pull/102873 >From 73c98df4baef99f96d9c67113ba2ed0d972e5a04 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Mon, 20 Mar 2023 20:24:11 +0800 Subject: [PATCH 1/6] [lldb] Claim to support swbreak and hwbreak packets when debuggi

[Lldb-commits] [lldb] [LLDB] Add AST node classes, functions, etc. for Data Inspection Lang… (PR #95738)

2024-08-12 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,459 @@ +//===-- DILAST.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: Ap

[Lldb-commits] [lldb] New ThreadPlanSingleThreadTimeout to resolve potential deadlock in single thread stepping (PR #90930)

2024-08-12 Thread Pavel Labath via lldb-commits
labath wrote: It's not just this bot. I also found failures on [aarch64](https://lab.llvm.org/buildbot/#/builders/59/builds/2999) and [arm](https://lab.llvm.org/buildbot/#/builders/18/builds/2079). I don't see it on the mac bots, but I don't know how to look further into the history for thos

[Lldb-commits] [lldb] [lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (PR #102123)

2024-08-12 Thread Pavel Labath via lldb-commits
labath wrote: > I guess what I was proposing was more about deleting code than adding it. We > must always have at most _one_ index, but we have a lot of code allowing for > the situation of two indices (manual & {apple, dwarf}). Okay. I think I understand now what you meant -- which was to ha

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
clayborg wrote: We should also document in the headerdoc this new `const SymbolContext *sc = nullptr` argument and say something like: ``` /// \param[in] sc If the value is NULL, then all modules will be searched in /// order. If the value is a valid pointer and if a module is specified in th

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -351,8 +351,8 @@ CommandObjectDisassemble::GetNameRanges(CommandReturnObject &result) { // Find functions matching the given name. SymbolContextList sc_list; - GetTarget().GetImages().FindFunctions(name, eFunctionNameTypeAuto, -

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -1764,8 +1764,8 @@ lldb::SBSymbolContextList SBTarget::FindFunctions(const char *name, function_options.include_inlines = true; FunctionNameType mask = static_cast(name_type_mask); - target_sp->GetImages().FindFunctions(ConstString(name), mask, -

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -295,7 +295,7 @@ class ModuleList { /// \see Module::FindFunctions () void FindFunctions(const RegularExpression &name, const ModuleFunctionSearchOptions &options, - SymbolContextList &sc_list); + const SymbolC

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -285,7 +285,7 @@ class ModuleList { /// \see Module::FindFunctions () void FindFunctions(ConstString name, lldb::FunctionNameType name_type_mask, const ModuleFunctionSearchOptions &options, - SymbolContextList &sc_list) const; +

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -355,6 +355,7 @@ class ModuleList { void FindSymbolsWithNameAndType(ConstString name, lldb::SymbolType symbol_type, + const SymbolContext &sc, SymbolContextList &sc_list)

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

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

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Thanks for trying this, and yes, this is exactly what I was thinking! After seeing all of the code changes that this created, I suggested in ModuleList.h that we add a the symbol context as a default parameter to the functions as `const SymbolContext *sc

[Lldb-commits] [lldb] [LLDB] Add AST node classes, functions, etc. for Data Inspection Lang… (PR #95738)

2024-08-12 Thread via lldb-commits
@@ -0,0 +1,459 @@ +//===-- DILAST.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: Ap

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
clayborg wrote: > I agree that passing some sort of "hint" object to prioritize the search > would be a more complete solution, but since this is @DmT021's first > contribution to LLVM I think we should merge this change if there are no > concerns with the current implementation, and if @DmT02

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Augusto Noronha via lldb-commits
augusto2112 wrote: I agree that passing some sort of "hint" object to prioritize the search would be a more complete solution, but since this is @DmT021's first contribution to LLVM I think we should merge this change if there are no concerns with the current implementation, and if @DmT021 wan

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-08-12 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond closed https://github.com/llvm/llvm-project/pull/101272 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

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

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: While this does solve the problem, it means other clients that want to do the same thing will need to create this same kind of code. I would propose we modify `ModuleList::FindSymbolsWithNameAndType(...)` to take an extra parameter `SymbolContext &sc` whi

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Dmitrii Galimzianov via lldb-commits
DmT021 wrote: > Out of curiosity, could you provide some context around where/how this came > up? I just noticed this by accident in the `dwarf all` log when I was trying to figure out why LLDB was evaluating expressions slowly in my project. Here's a swift forum thread with some logs. https:

[Lldb-commits] [lldb] [lldb] Avoid calling DataLayout constructor accepting Module pointer (NFC) (PR #102839)

2024-08-12 Thread Sergei Barannikov via lldb-commits
https://github.com/s-barannikov closed https://github.com/llvm/llvm-project/pull/102839 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] e26b42c - [lldb] Avoid calling DataLayout constructor accepting Module pointer (NFC) (#102839)

2024-08-12 Thread via lldb-commits
Author: Sergei Barannikov Date: 2024-08-12T21:46:47+03:00 New Revision: e26b42c70d37cbea47016984e1d2bfc347fb8818 URL: https://github.com/llvm/llvm-project/commit/e26b42c70d37cbea47016984e1d2bfc347fb8818 DIFF: https://github.com/llvm/llvm-project/commit/e26b42c70d37cbea47016984e1d2bfc347fb8818.d

[Lldb-commits] [lldb] New ThreadPlanSingleThreadTimeout to resolve potential deadlock in single thread stepping (PR #90930)

2024-08-12 Thread via lldb-commits
jeffreytan81 wrote: @labath, unfortunately the failing log does not provide much information to troubleshoot. Is it possible to gather more information of the failure? Like is it only this `lldb-x86_64-debian` bot timeout or including other bots? And is it consistently failing or occasionally

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 approved this pull request. https://github.com/llvm/llvm-project/pull/102835 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

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

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

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

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Michael Buch via lldb-commits
https://github.com/Michael137 commented: Generally, makes sense to me. Out of curiosity, could you provide some context around where/how this came up? The ideal version of this would be a version of `FindFunctions`/`FindSymbolsWithNameAndType` that took a `ModuleSP` hint (aka where to search

[Lldb-commits] [lldb] [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (PR #102570)

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

[Lldb-commits] [lldb] f1e2886 - [LLDB] Impove ObjectFileELF's .dynamic parsing and usage. (#102570)

2024-08-12 Thread via lldb-commits
Author: Greg Clayton Date: 2024-08-12T10:57:04-07:00 New Revision: f1e2886261281e788e4faae406c24e787c1dbdd0 URL: https://github.com/llvm/llvm-project/commit/f1e2886261281e788e4faae406c24e787c1dbdd0 DIFF: https://github.com/llvm/llvm-project/commit/f1e2886261281e788e4faae406c24e787c1dbdd0.diff

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond edited https://github.com/llvm/llvm-project/pull/102708 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Jacob Lalonde via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Dmitrii Galimzianov (DmT021) Changes When we search for a symbol, we first check if it is in the module_sp of the current SymbolContext, and if not, we check in the target's modules. However, the target's ModuleList also includes the alrea

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

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

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Dmitrii Galimzianov via lldb-commits
https://github.com/DmT021 updated https://github.com/llvm/llvm-project/pull/102835 >From 45c91e403a36360727a5cd51e1a84f86027a77bc Mon Sep 17 00:00:00 2001 From: Dmitrii Galimzianov Date: Mon, 12 Aug 2024 01:09:33 +0200 Subject: [PATCH] Remove redundant symbol lookups in IRExecutionUnit::FindIn

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -258,6 +258,7 @@ class TargetProperties : public Properties { bool GetDebugUtilityExpression() const; + clayborg wrote: remove blank line https://github.com/llvm/llvm-project/pull/102708 ___ lldb-commits mail

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -408,3 +410,23 @@ llvm::json::Value DebuggerStats::ReportStatistics( return std::move(global_stats); } + +llvm::json::Value SummaryStatistics::ToJSON() const { + json::Object body {{ + {"invocationCount", GetSummaryCount()}, + {"totalTime", GetTotalTime()}, +

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -615,7 +615,16 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on // the synthetic children being

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -918,3 +920,24 @@ def test_order_of_options_do_not_matter(self): debug_stats_1, f"The order of options '{options[0]}' and '{options[1]}' should not matter", ) + +def test_summary_statistics_providers(self): +""" +

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -1,7 +1,13 @@ // Test that the lldb command `statistics` works. +#include + +void foo() { + std::string str = "hello world"; clayborg wrote: We want to test that this works for: - built in C++ summary formatters (std::string) - python summary formatters - s

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -1,7 +1,13 @@ // Test that the lldb command `statistics` works. +#include + +void foo() { + std::string str = "hello world"; clayborg wrote: We should also test a type that uses a template as some summary providers match based on a regex like: ``` std::vec

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -615,7 +615,16 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on // the synthetic children being

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -615,7 +615,16 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on // the synthetic children being

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/102708 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Greg Clayton via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; clayborg wrote: Do

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -258,6 +258,7 @@ class TargetProperties : public Properties { bool GetDebugUtilityExpression() const; + bulbazord wrote: nit: spurious newline https://github.com/llvm/llvm-project/pull/102708 ___ lldb-commits

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Alex Langford via lldb-commits
@@ -3193,6 +3193,14 @@ bool Target::SetSectionUnloaded(const lldb::SectionSP §ion_sp, void Target::ClearAllLoadedSections() { m_section_load_history.Clear(); } +lldb_private::SummaryStatistics& Target::GetSummaryStatisticsForProvider(lldb_private::ConstString summary_provi

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Makes sense to me and the change looks good. Feel free to move this out of draft mode :) https://github.com/llvm/llvm-project/pull/102835 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.l

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Dmitrii Galimzianov via lldb-commits
@@ -799,20 +803,21 @@ IRExecutionUnit::FindInSymbols(const std::vector &names, sc_list); if (auto load_addr = resolver.Resolve(sc_list)) return *load_addr; -} -if (sc.target_sp) { - SymbolContextList sc_list; -

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Augusto Noronha via lldb-commits
augusto2112 wrote: @DmT021 I think you can update this patch and set it ready for review then :) https://github.com/llvm/llvm-project/pull/102835 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Jacob Lalonde via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [lldb] Construct SmallVector with ArrayRef (NFC) (PR #102793)

2024-08-12 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Thanks! https://github.com/llvm/llvm-project/pull/102793 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Jacob Lalonde via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Dmitrii Galimzianov via lldb-commits
DmT021 wrote: > Could you run `ninja check-lldb` from your build folder to make sure this > change doesn't break anything? Already did. All tests are ok. https://github.com/llvm/llvm-project/pull/102835 ___ lldb-commits mailing list lldb-commits@list

[Lldb-commits] [lldb] [lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (PR #102123)

2024-08-12 Thread Greg Clayton via lldb-commits
clayborg wrote: The main issue that this covers is when you have N .o files compiled with .debug_names, and M .o files compiled without it, and then you link N+M into a final executable. The linker will simply concatenate all of the .o files section together, but the linker doesn't know anythi

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Dmitrii Galimzianov via lldb-commits
@@ -785,6 +785,10 @@ IRExecutionUnit::FindInSymbols(const std::vector &names, return LLDB_INVALID_ADDRESS; } + ModuleList images = target->GetImages(); DmT021 wrote: It was already checked 4 lines above ``` if (!target) { // We shouldn't be doin

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Augusto Noronha via lldb-commits
@@ -785,6 +785,10 @@ IRExecutionUnit::FindInSymbols(const std::vector &names, return LLDB_INVALID_ADDRESS; } + ModuleList images = target->GetImages(); augusto2112 wrote: Oh, looks like target is already checked right before this, disregard this comm

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Augusto Noronha via lldb-commits
@@ -785,6 +785,10 @@ IRExecutionUnit::FindInSymbols(const std::vector &names, return LLDB_INVALID_ADDRESS; } + ModuleList images = target->GetImages(); augusto2112 wrote: Check if `target` is null before accessing it. https://github.com/llvm/llvm-pro

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Augusto Noronha via lldb-commits
@@ -799,20 +803,21 @@ IRExecutionUnit::FindInSymbols(const std::vector &names, sc_list); if (auto load_addr = resolver.Resolve(sc_list)) return *load_addr; -} -if (sc.target_sp) { - SymbolContextList sc_list; -

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 edited https://github.com/llvm/llvm-project/pull/102835 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Remove redundant symbol lookups in IRExecutionUnit::FindInSymbols (PR #102835)

2024-08-12 Thread Augusto Noronha via lldb-commits
https://github.com/augusto2112 requested changes to this pull request. I think overall this looks good! Just some small things to fix. Could you run `ninja check-lldb` from your build folder to make sure this change doesn't break anything? https://github.com/llvm/llvm-project/pull/102835 _

[Lldb-commits] [lldb] [lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (PR #102123)

2024-08-12 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: > The current setup makes sense to me, but I guess that's expected as I'm the > one who created it. I can also imagine something like what you propose, but > it doesn't seem like a clear win to me. These objects are owned by > SymbolFileDWARF, and we probably don't want t

[Lldb-commits] [lldb] [lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (PR #102123)

2024-08-12 Thread Pavel Labath via lldb-commits
labath wrote: The current setup makes sense to me, but I guess that's expected as I'm the one who created it. I can also imagine something like what you propose, but it doesn't seem like a clear win to me. These objects are owned by SymbolFileDWARF, and we probably don't want to have it do the

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond edited https://github.com/llvm/llvm-project/pull/102708 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Jacob Lalonde via lldb-commits
@@ -615,7 +615,16 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on // the synthetic children being

[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

2024-08-12 Thread Jacob Lalonde via lldb-commits
Jlalond wrote: @labath those did get omitted due to github marking them as outdated due to moving the code around, I mixed that. I appreciate your long review on this one, I learned a lot from your feedback. I'm going to let CI run and merge when it's completed https://github.com/llvm/llvm-pr

[Lldb-commits] [lldb] a0c57a0 - Revert "[lldb] Tolerate multiple compile units with the same DWO ID (#100577)"

2024-08-12 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-08-12T18:43:16+02:00 New Revision: a0c57a0f3c6b44ce8f2c7222d0932df85883cf06 URL: https://github.com/llvm/llvm-project/commit/a0c57a0f3c6b44ce8f2c7222d0932df85883cf06 DIFF: https://github.com/llvm/llvm-project/commit/a0c57a0f3c6b44ce8f2c7222d0932df85883cf06.diff

[Lldb-commits] [lldb] b3ed1d9 - Reapply "[lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (#102123)"

2024-08-12 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-08-12T18:41:28+02:00 New Revision: b3ed1d92112e0f455f8ef0888ef4c5d0ca29096d URL: https://github.com/llvm/llvm-project/commit/b3ed1d92112e0f455f8ef0888ef4c5d0ca29096d DIFF: https://github.com/llvm/llvm-project/commit/b3ed1d92112e0f455f8ef0888ef4c5d0ca29096d.diff

[Lldb-commits] [lldb] [lldb] Tolerate multiple compile units with the same DWO ID (PR #100577)

2024-08-12 Thread Pavel Labath via lldb-commits
labath wrote: This appears to be the same issue that David reported. I'm going to revert this while I investigate. I doubt it's a compiler thing as the test does not actually compile anything. It's more likely that something in the code is flaky (and I think I have an idea what could that be).

[Lldb-commits] [lldb] 38b67c5 - Revert "[lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (#102123)"

2024-08-12 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2024-08-12T18:36:18+02:00 New Revision: 38b67c54ed858f60c0caebcfba4b61f9326684ca URL: https://github.com/llvm/llvm-project/commit/38b67c54ed858f60c0caebcfba4b61f9326684ca DIFF: https://github.com/llvm/llvm-project/commit/38b67c54ed858f60c0caebcfba4b61f9326684ca.diff

[Lldb-commits] [lldb] [lldb-dap] Provide `declarationLocation` for variables (PR #102928)

2024-08-12 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: @walter-erquinigo I took a first stab at implementing the DAP proposal. Seemed rather straightforward. I would love to hear if I missed anything. Also, I am not sure how to implement `valueLocation`, i.e., a the source location referecend by the value. E.g., for a function

[Lldb-commits] [lldb] [lldb-dap] Provide `declarationLocation` for variables (PR #102928)

2024-08-12 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang created https://github.com/llvm/llvm-project/pull/102928 `declarationLocation` is about to become part of the upstream debug adapter protocol (see microsoft/debug-adapter-protocol#343). This is a draft implementation, to be finalized and merged after the corresp

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-12 Thread Pavel Labath via lldb-commits
labath wrote: > So the main idea is: if either ObjectFile or PostMortemProcess can return a > reference to the data in the Peek calls, then should as long as they have > this data mapped into the LLDB address space and can hand out a pointer to > the data. If they can't, we should fall back to

[Lldb-commits] [lldb] [lldb] Add 'FindInMemory()' overload for PostMortemProcess. (PR #102536)

2024-08-12 Thread Pavel Labath via lldb-commits
labath wrote: It just so happens that I got a `memory find` bug today, which made me realize just how broken the current behavior is -- it will effectively abort the search as soon as it runs into any unreadable block of memory (plus it also reads one byte at a time, which makes it excruciatin

[Lldb-commits] [lldb] [lldb-dap] Emit declarations along with variables (PR #74865)

2024-08-12 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: > FYI @walter-erquinigo: There is a proposal under discussion to add > first-class support for `declarationLocation` (and also `valueLocation`) to > the debug adapter protocol. See > [microsoft/debug-adapter-protocol#343](https://github.com/microsoft/debug-adapter-proto

[Lldb-commits] [lldb] [lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (PR #102123)

2024-08-12 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: > The fallback index will only index those units that aren't covered by the > debug_names index, so if debug_names covers everything, the fallback is a noop Got it, this is what I was hoping that would happen! Thanks for explaining it. (future ideas) This makes me wonder

[Lldb-commits] [lldb] [lldb-dap] Emit declarations along with variables (PR #74865)

2024-08-12 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: FYI @walter-erquinigo: There is a proposal under discussion to add first-class support for `declarationLocation` (and also `valueLocation`) to the debug adapter protocol. See https://github.com/microsoft/debug-adapter-protocol/issues/343 https://github.com/llvm/llvm-projec

[Lldb-commits] [lldb] [lldb] Tolerate multiple compile units with the same DWO ID (PR #100577)

2024-08-12 Thread Adrian Prantl via lldb-commits
adrian-prantl wrote: @labath This test fails in two configs on the matrix bot: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-matrix/602/testReport/junit/lldb-shell/SymbolFile_DWARF_x86/Test_Clang_17_0_6___dwp_hash_collision_s/ https://green.lab.llvm.org/job/llvm.org/view/LLDB/j

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Michael Buch via lldb-commits
Michael137 wrote: Stats around this area could definitely be interesting to explore! https://github.com/llvm/llvm-project/pull/102708 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (PR #102123)

2024-08-12 Thread Pavel Labath via lldb-commits
labath wrote: Sort of yes (*), but only so much as it is necessary to make it correct, and the level of slowdown depends on how much non-indexed code you have. The fallback index will only index those units that aren't covered by the debug_names index, so if debug_names covers everything, the

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Michael Buch via lldb-commits
@@ -615,7 +615,16 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on // the synthetic children being

[Lldb-commits] [lldb] [lldb] Avoid calling DataLayout constructor accepting Module pointer (NFC) (PR #102839)

2024-08-12 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. Lifetimes look correct to me, thanks! https://github.com/llvm/llvm-project/pull/102839 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/l

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Michael Buch via lldb-commits
@@ -1,7 +1,13 @@ // Test that the lldb command `statistics` works. +#include + +void foo() { + std::string str = "hello world"; Michael137 wrote: instead of relying on `std::string` formatter should we add a type summary for a dummy type? And test against tha

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Michael Buch via lldb-commits
@@ -918,3 +920,24 @@ def test_order_of_options_do_not_matter(self): debug_stats_1, f"The order of options '{options[0]}' and '{options[1]}' should not matter", ) + +def test_summary_statistics_providers(self): +""" +

[Lldb-commits] [lldb] [lldb/DWARF] Search fallback to the manual index in GetFullyQualified… (PR #102123)

2024-08-12 Thread Felipe de Azevedo Piovezan via lldb-commits
felipepiovezan wrote: Isn't this going to degrade the performance of _all_ negative queries? I don't remember off the top of my head what is "m_fallback" when we have an accelerator table, but this worries me. https://github.com/llvm/llvm-project/pull/102123

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

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

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

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

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Michael Buch via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Michael Buch via lldb-commits
@@ -25,6 +26,7 @@ namespace lldb_private { using StatsClock = std::chrono::high_resolution_clock; using StatsTimepoint = std::chrono::time_point; +using Duration = std::chrono::duration; Michael137 wrote: Is this used anywhere? https://github.com/llvm/llvm-p

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Michael Buch via lldb-commits
@@ -615,7 +615,16 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on // the synthetic children being

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Michael Buch via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

[Lldb-commits] [lldb] [LLDB][Data Formatters] Calculate average and total time for summary providers within lldb (PR #102708)

2024-08-12 Thread Michael Buch via lldb-commits
@@ -174,6 +176,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + SummaryStatistics() = default; + SummaryStatistics(lldb_private::Co

  1   2   >