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

2024-08-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. https://github.com/llvm/llvm-project/pull/104041 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix single thread stepping timeout race condition (PR #104195)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -29,10 +29,10 @@ ThreadPlanSingleThreadTimeout::ThreadPlanSingleThreadTimeout( : ThreadPlan(ThreadPlan::eKindSingleThreadTimeout, "Single thread timeout", thread, eVoteNo, eVoteNoOpinion), m_info(info), m_state(State::WaitTimeout) { - // TODO: re

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -318,6 +318,32 @@ Status ELFLinuxPrStatus::Parse(const DataExtractor &data, return error; } +static struct compat_timeval +copy_timespecs(const ProcessInstanceInfo::timespec &oth) { + using sec_t = decltype(compat_timeval::tv_sec); + using usec_t = decltype(compat_timev

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -318,6 +318,32 @@ Status ELFLinuxPrStatus::Parse(const DataExtractor &data, return error; } +static struct compat_timeval +copy_timespecs(const ProcessInstanceInfo::timespec &oth) { + using sec_t = decltype(compat_timeval::tv_sec); + using usec_t = decltype(compat_timev

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -394,6 +420,107 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -4028,6 +4049,154 @@ void request_disassemble(const llvm::json::Object &request) { response.try_emplace("body", std::move(body)); g_dap.SendJSON(llvm::json::Value(std::move(response))); } + +// "ReadMemoryRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" },

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -4028,6 +4049,154 @@ void request_disassemble(const llvm::json::Object &request) { response.try_emplace("body", std::move(body)); g_dap.SendJSON(llvm::json::Value(std::move(response))); } + +// "ReadMemoryRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" },

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -4028,6 +4049,154 @@ void request_disassemble(const llvm::json::Object &request) { response.try_emplace("body", std::move(body)); g_dap.SendJSON(llvm::json::Value(std::move(response))); } + +// "ReadMemoryRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" },

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -1253,6 +1274,10 @@ llvm::json::Value CreateVariable(lldb::SBValue v, int64_t variablesReference, else object.try_emplace("variablesReference", (int64_t)0); + if (lldb::addr_t addr = GetMemoryReference(v); addr != LLDB_INVALID_ADDRESS) { +object.try_emplace("me

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -411,6 +411,12 @@ struct VariableDescription { std::string GetResult(llvm::StringRef context); }; +/// Get the corresponding `memoryReference` for a value. +/// +/// According to the DAP documentation, the `memoryReference` should +/// refer to the pointee, not to the add

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -4028,6 +4049,154 @@ void request_disassemble(const llvm::json::Object &request) { response.try_emplace("body", std::move(body)); g_dap.SendJSON(llvm::json::Value(std::move(response))); } + +// "ReadMemoryRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" },

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -3600,8 +3617,12 @@ void request_setVariable(const llvm::json::Object &request) { if (variable.MightHaveChildren()) newVariablesReference = g_dap.variables.InsertExpandableVariable( variable, /*is_permanent=*/false); - body.try_emplace("vari

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -1411,6 +1422,10 @@ void request_evaluate(const llvm::json::Object &request) { } else { body.try_emplace("variablesReference", (int64_t)0); } + if (lldb::addr_t addr = GetMemoryReference(value); + addr != LLDB_INVALID_ADDRESS) { +bo

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -4028,6 +4049,154 @@ void request_disassemble(const llvm::json::Object &request) { response.try_emplace("body", std::move(body)); g_dap.SendJSON(llvm::json::Value(std::move(response))); } + +// "ReadMemoryRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" },

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -1085,6 +1085,19 @@ std::string VariableDescription::GetResult(llvm::StringRef context) { return description.trim().str(); } +lldb::addr_t GetMemoryReference(lldb::SBValue v) { clayborg wrote: If we return a `std::optional` it will clean up the call sit

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -4028,6 +4049,154 @@ void request_disassemble(const llvm::json::Object &request) { response.try_emplace("body", std::move(body)); g_dap.SendJSON(llvm::json::Value(std::move(response))); } + +// "ReadMemoryRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" },

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

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

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -1085,6 +1085,19 @@ std::string VariableDescription::GetResult(llvm::StringRef context) { return description.trim().str(); } +lldb::addr_t GetMemoryReference(lldb::SBValue v) { + if (!v.GetType().IsPointerType() && !v.GetType().IsArrayType()) { +return LLDB_INVALID_

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

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -174,6 +177,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, std::string impl_type)

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

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -174,6 +177,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, std::string impl_type)

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

2024-08-14 Thread Greg Clayton via lldb-commits
clayborg wrote: > Could you please explain to me why we use different rules in symbol lookups? > Namely: > > * > [ClangExpressionDeclMap::GetSymbolAddress](https://github.com/llvm/llvm-project/pull/102835/files#diff-5d2da8306a4f4991885836925979f188658789adc8041c37811c243f2cdca24c) > doesn't s

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

2024-08-14 Thread Dmitrii Galimzianov via lldb-commits
DmT021 wrote: Could you please explain to me why we use different rules in symbol lookups? Namely: - [ClangExpressionDeclMap::GetSymbolAddress](https://github.com/llvm/llvm-project/pull/102835/files#diff-5d2da8306a4f4991885836925979f188658789adc8041c37811c243f2cdca24c) doesn't search in the Mo

[Lldb-commits] [lldb] [LLDB][OSX] Removed semi colon generating a warning during build (PR #104398)

2024-08-14 Thread via lldb-commits
github-actions[bot] wrote: @boredhuman Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a bui

[Lldb-commits] [lldb] [LLDB][OSX] Removed semi colon generating a warning during build (PR #104398)

2024-08-14 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo closed https://github.com/llvm/llvm-project/pull/104398 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][OSX] Removed semi colon generating a warning during build (PR #104398)

2024-08-14 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: Thank you! https://github.com/llvm/llvm-project/pull/104398 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] b4dc986 - [LLDB][OSX] Removed semi colon generating a warning during build (#104398)

2024-08-14 Thread via lldb-commits
Author: Daniel Wedzicha Date: 2024-08-15T00:23:40-04:00 New Revision: b4dc9869381f91af419ec170837ac324d09525e5 URL: https://github.com/llvm/llvm-project/commit/b4dc9869381f91af419ec170837ac324d09525e5 DIFF: https://github.com/llvm/llvm-project/commit/b4dc9869381f91af419ec170837ac324d09525e5.dif

[Lldb-commits] [lldb] [LLDB][OSX] Removed semi colon generating a warning during build (PR #104398)

2024-08-14 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo approved this pull request. https://github.com/llvm/llvm-project/pull/104398 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][OSX] Removed semi colon generating a warning during build (PR #104398)

2024-08-14 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Daniel Wedzicha (boredhuman) Changes Singular warning I noticed when compiling lldb. --- Full diff: https://github.com/llvm/llvm-project/pull/104398.diff 1 Files Affected: - (modified) lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm (+1

[Lldb-commits] [lldb] [LLDB][OSX] Removed semi colon generating a warning during build (PR #104398)

2024-08-14 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] [LLDB][OSX] Removed semi colon generating a warning during build (PR #104398)

2024-08-14 Thread Daniel Wedzicha via lldb-commits
https://github.com/boredhuman created https://github.com/llvm/llvm-project/pull/104398 Singular warning I noticed when compiling lldb. >From 70bff417af642a6232264b3ef51584ef089afa2b Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 15 Aug 2024 00:09:25 -0400 Subject: [PATCH] [LLDB][OSX] Removed

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

2024-08-14 Thread Jacob Lalonde via lldb-commits
@@ -174,6 +177,83 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, std::string impl_type)

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

2024-08-14 Thread Jacob Lalonde via lldb-commits
@@ -408,3 +410,21 @@ llvm::json::Value DebuggerStats::ReportStatistics( return std::move(global_stats); } + +llvm::json::Value SummaryStatistics::ToJSON() const { + return json::Object{{ + {"name", GetName()}, + {"type", GetSummaryKindName()}, + {"invocationC

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

2024-08-14 Thread Jacob Lalonde via lldb-commits
@@ -201,3 +216,12 @@ std::string ScriptSummaryFormat::GetDescription() { } return std::string(sstr.GetString()); } + +std::string ScriptSummaryFormat::GetName() { return m_script_formatter_name; } + +std::string ScriptSummaryFormat::GetSummaryKindName() { + if (!m_python_s

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

2024-08-14 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond updated https://github.com/llvm/llvm-project/pull/102708 >From c0a7286b0107d3161b18de8f05d4d016150e96a5 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde Date: Thu, 8 Aug 2024 08:58:52 -0700 Subject: [PATCH 01/10] Initial attempt at new classes Summary statistics in Summa

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

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -408,3 +410,21 @@ llvm::json::Value DebuggerStats::ReportStatistics( return std::move(global_stats); } + +llvm::json::Value SummaryStatistics::ToJSON() const { + return json::Object{{ + {"name", GetName()}, + {"type", GetSummaryKindName()}, + {"invocationC

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

2024-08-14 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-14 Thread Greg Clayton via lldb-commits
@@ -174,6 +177,86 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, std::string impl_type)

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

2024-08-14 Thread Greg Clayton via lldb-commits
@@ -201,3 +216,12 @@ std::string ScriptSummaryFormat::GetDescription() { } return std::string(sstr.GetString()); } + +std::string ScriptSummaryFormat::GetName() { return m_script_formatter_name; } + +std::string ScriptSummaryFormat::GetSummaryKindName() { + if (!m_python_s

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

2024-08-14 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-14 Thread Jacob Lalonde via lldb-commits
@@ -0,0 +1,35 @@ +// Test that the lldb command `statistics` works. Jlalond wrote: Sounds good, any sample test cases of multi threaded access I can steal the homework of? https://github.com/llvm/llvm-project/pull/102708

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

2024-08-14 Thread Jacob Lalonde via lldb-commits
@@ -174,6 +177,86 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, std::string impl_type)

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

2024-08-14 Thread Jacob Lalonde via lldb-commits
@@ -174,6 +177,86 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, std::string impl_type)

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

2024-08-14 Thread Jason Molenda via lldb-commits
jasonmolenda wrote: I don't want to derail the conversation about this PR, but I've been wanting to overhaul our Target::ReadMemory and Process::ReadMemory API in lldb for months now, and haven't put together a coherent proposal for it yet. I need to clear a few things off my task list and ge

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: https://github.com/user-attachments/assets/f1ec37fe-414e-41ee-ad10-a213570d3e5f https://github.com/llvm/llvm-project/pull/104317 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: @vogelsgesang can you share a screenshot? https://github.com/llvm/llvm-project/pull/104317 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: @clayborg you'll be happy to review this https://github.com/llvm/llvm-project/pull/104317 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/104317 >From a5b4f6e7e105d36b82f9de588d2705ad3d622953 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Wed, 14 Aug 2024 11:52:40 + Subject: [PATCH] [lldb-dap] Support inspecting memory Adds support fo

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 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 82ee31f75ac1316006fa9e21dddfddec37cf7072...e01ea18961bbae0fb747b312670946bd768c5d73 lldb/

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 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 82ee31f75ac1316006fa9e21dddfddec37cf7072 e01ea18961bbae0fb747b312670946bd768c5d73 --e

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Adrian Vogelsgesang (vogelsgesang) Changes Adds support for the `readMemory` request which allows VS-Code to inspect memory. Also, add `memoryReference` to variablesa and `evaluate` responses, such that the binary view can be opened from t

[Lldb-commits] [lldb] [lldb-dap] Support inspecting memory (PR #104317)

2024-08-14 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang created https://github.com/llvm/llvm-project/pull/104317 Adds support for the `readMemory` request which allows VS-Code to inspect memory. Also, add `memoryReference` to variablesa and `evaluate` responses, such that the binary view can be opened from the variab

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

2024-08-14 Thread Jason Molenda via lldb-commits
jasonmolenda wrote: > > To (preemtively) fix that, you should probably change lldb to recognize the > > gdb response (`swbreak`) and treat it the same way as the one from > > lldb-server. Ideally, you should also add a test to make sure this works > > (and stays working) -- for that, you coul

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

2024-08-14 Thread Michael Buch via lldb-commits
@@ -0,0 +1,35 @@ +// Test that the lldb command `statistics` works. Michael137 wrote: All this lock-talk makes me think we should have a test that exercises accessing the summary stats map from multiple threads. That way TSAN will help us in the test-suite. ht

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

2024-08-14 Thread Michael Buch via lldb-commits
@@ -174,6 +177,86 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, std::string impl_type)

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

2024-08-14 Thread Michael Buch via lldb-commits
@@ -174,6 +177,86 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, std::string impl_type)

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

2024-08-14 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: If it's unused in this PR, I'd rather remove it here.

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
@@ -0,0 +1,162 @@ +//===-- ThreadElfCoreTest.cpp *- 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:

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

2024-08-14 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond updated https://github.com/llvm/llvm-project/pull/102708 >From c0a7286b0107d3161b18de8f05d4d016150e96a5 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde Date: Thu, 8 Aug 2024 08:58:52 -0700 Subject: [PATCH 1/9] Initial attempt at new classes Summary statistics in Summary

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

2024-08-14 Thread Jacob Lalonde 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; Jlalond wrote: Originally I had this passed down to the invocation as we

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

2024-08-14 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond updated https://github.com/llvm/llvm-project/pull/102708 >From c0a7286b0107d3161b18de8f05d4d016150e96a5 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde Date: Thu, 8 Aug 2024 08:58:52 -0700 Subject: [PATCH 1/8] Initial attempt at new classes Summary statistics in Summary

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
@@ -394,6 +420,114 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
@@ -394,6 +420,114 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
https://github.com/feg208 updated https://github.com/llvm/llvm-project/pull/104109 >From 8f2f84294ea3875c88ce36a4980fd3a3afce01de Mon Sep 17 00:00:00 2001 From: Fred Grim Date: Tue, 18 Jun 2024 10:38:09 -0700 Subject: [PATCH 1/2] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrS

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
@@ -394,6 +420,114 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb-dap] Expose log path in extension settings (PR #103482)

2024-08-14 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo approved this pull request. nice! https://github.com/llvm/llvm-project/pull/103482 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Removed gdbserver ports map from lldb-server (PR #104238)

2024-08-14 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman updated https://github.com/llvm/llvm-project/pull/104238 >From 5732bda3558a0d55f2f7b9d1a3722d11458a2360 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilyev Date: Wed, 14 Aug 2024 22:36:52 +0400 Subject: [PATCH] [lldb] Removed gdbserver ports map from lldb-server Listen t

[Lldb-commits] [lldb] [lldb] Removed gdbserver ports map from lldb-server (PR #104238)

2024-08-14 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman edited https://github.com/llvm/llvm-project/pull/104238 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Removed gdbserver ports map from lldb-server (PR #104238)

2024-08-14 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 d550ada5ab6cd6e49de71ac4c9aa27ced4c11de0 46808aacc7f79cd5220651ff5976780e3aec3d3e --e

[Lldb-commits] [lldb] [lldb] Removed gdbserver ports map from lldb-server (PR #104238)

2024-08-14 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Dmitry Vasilyev (slydiman) Changes Listen to gdbserver-port, accept the connection and run `lldb-server gdbserver --fd` on all platforms. Added acceptor_gdb and gdb_thread to lldb-platform.cpp SharedSocket has been moved to ConnectionFileD

[Lldb-commits] [lldb] [lldb] Removed gdbserver ports map from lldb-server (PR #104238)

2024-08-14 Thread Dmitry Vasilyev via lldb-commits
https://github.com/slydiman created https://github.com/llvm/llvm-project/pull/104238 Listen to gdbserver-port, accept the connection and run `lldb-server gdbserver --fd` on all platforms. Added acceptor_gdb and gdb_thread to lldb-platform.cpp SharedSocket has been moved to ConnectionFileDescri

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

2024-08-14 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: No worries. I will have to rework this commit anyway. In the meantime, a proposal was merged upstream and also already implemented in VS-Code. However, there were still larger changes which will require a complete rewrite of this commit https://github.com/llvm/llvm-project

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,162 @@ +//===-- ThreadElfCoreTest.cpp *- 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:

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Pavel Labath via lldb-commits
@@ -394,6 +420,114 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Pavel Labath via lldb-commits
@@ -394,6 +420,114 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Pavel Labath via lldb-commits
@@ -394,6 +420,114 @@ Status ELFLinuxPrPsInfo::Parse(const DataExtractor &data, return error; } +std::optional +ELFLinuxPrPsInfo::Populate(const lldb::ProcessSP &process_sp) { + ELFLinuxPrPsInfo prpsinfo{}; + prpsinfo.pr_pid = process_sp->GetID(); + ProcessInstanceInfo in

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: I like how you've made a separate patch out of these functions. Just a couple of random improvements I noticed. https://github.com/llvm/llvm-project/pull/104109 ___ lldb-commits mailing list lldb-commits@lists.llvm

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/104109 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2024-08-14 Thread Pavel Labath via lldb-commits
labath wrote: > The purpose of this it to make the `find memory` faster for post mortem > processes. This patch gives us nearly 100x speed up based on my tests. I see. And do you have an idea of how load-bearing that number is? For example, would you settle for a 18x speedup? That's what I got

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

2024-08-14 Thread via lldb-commits
jeffreytan81 wrote: The GDB packet log is very useful (especially with a good run log at the top to compare). I read with @clayborg . The log indicates that "self.thread.StepOver(lldb.eOnlyThisThread)" sent a "$vCont;c:p1a24.1a24" to continue single thread at the end but lacking a "\x03" asy

[Lldb-commits] [lldb] Fix single thread stepping timeout race condition (PR #104195)

2024-08-14 Thread via lldb-commits
https://github.com/jeffreytan81 edited https://github.com/llvm/llvm-project/pull/104195 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Fix single thread stepping timeout race condition (PR #104195)

2024-08-14 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (jeffreytan81) Changes This PR fixes a potential race condition in https://github.com/llvm/llvm-project/pull/90930. This race can happen because the original code set `m_info->m_isAlive = true` **after** the timer thread is created.

[Lldb-commits] [lldb] Fix single thread stepping timeout race condition (PR #104195)

2024-08-14 Thread via lldb-commits
https://github.com/jeffreytan81 created https://github.com/llvm/llvm-project/pull/104195 This PR fixes a potential race condition in https://github.com/llvm/llvm-project/pull/90930. This race can happen because the original code set `m_info->m_isAlive = true` **after** the timer thread is cr

[Lldb-commits] [lldb] [WIP] memory find speedup+bugfix (PR #104193)

2024-08-14 Thread Pavel Labath via lldb-commits
https://github.com/labath created https://github.com/llvm/llvm-project/pull/104193 None >From d9517b19db12de3530fea967ae6d577317d1c5a2 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 14 Aug 2024 19:58:27 +0200 Subject: [PATCH] [WIP] memory find speedup+bugfix --- lldb/source/Target/Pr

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

2024-08-14 Thread Alex Langford 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] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Fred Grim (feg208) Changes To create elf core files there are multiple notes in the core file that contain these structs as the note. These populate methods take a Process and produce fully specified structures that can be used to fill the

[Lldb-commits] [lldb] [lldb] Add Populate Methods for ELFLinuxPrPsInfo and ELFLinuxPrStatus (PR #104109)

2024-08-14 Thread Fred Grim via lldb-commits
https://github.com/feg208 created https://github.com/llvm/llvm-project/pull/104109 To create elf core files there are multiple notes in the core file that contain these structs as the note. These populate methods take a Process and produce fully specified structures that can be used to fill th

[Lldb-commits] [lldb] Reland "[lldb] Reland 2402b3213c2f with `/H` to debug the windows build issue (PR #101672)

2024-08-14 Thread Dmitry Vasilyev via lldb-commits
slydiman wrote: After this patch it is very hard to build lldb on Windows. We got the errors like the following ``` D:\llvm-project\lldb\source\Plugins\ScriptInterpreter\Python\Interfaces\ScriptedThreadPlanPythonInterface\ScriptedThreadPlanPythonInterface.cpp: fatal error C1041: cannot open pr

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

2024-08-14 Thread Jacob Lalonde via lldb-commits
@@ -258,6 +258,9 @@ class TypeSummaryImpl { virtual std::string GetDescription() = 0; + virtual ConstString GetName() = 0; + virtual ConstString GetImplType() = 0; Jlalond wrote: I ended up just going with kind name https://github.com/llvm/llvm-project/

[Lldb-commits] [lldb] [lldb] Remove Phabricator usernames from Code Owners file (PR #102590)

2024-08-14 Thread Med Ismail Bennani via lldb-commits
https://github.com/medismailben approved this pull request. https://github.com/llvm/llvm-project/pull/102590 ___ 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-14 Thread Jacob Lalonde via lldb-commits
@@ -615,7 +615,15 @@ bool ValueObject::GetSummaryAsCString(TypeSummaryImpl *summary_ptr, m_synthetic_value->UpdateValueIfNeeded(); // the summary might depend on // the synthetic children being

[Lldb-commits] [lldb] [lldb] Remove Phabricator usernames from Code Owners file (PR #102590)

2024-08-14 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. https://github.com/llvm/llvm-project/pull/102590 ___ 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-14 Thread Michael Buch via lldb-commits
@@ -615,7 +615,15 @@ 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-14 Thread Jonas Devlieghere via lldb-commits
@@ -174,6 +177,82 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, +

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

2024-08-14 Thread Jonas Devlieghere via lldb-commits
@@ -174,6 +177,82 @@ struct StatisticsOptions { std::optional m_include_transcript; }; +/// A class that represents statistics about a TypeSummaryProviders invocations +class SummaryStatistics { +public: + explicit SummaryStatistics(std::string name, +

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

2024-08-14 Thread Jonas Devlieghere via lldb-commits
@@ -145,15 +148,34 @@ std::string CXXFunctionSummaryFormat::GetDescription() { return std::string(sstr.GetString()); } +std::string CXXFunctionSummaryFormat::GetName() { + return m_description; +} + +std::string CXXFunctionSummaryFormat::GetSummaryKindName() { + return "c+

  1   2   >