@@ -133,7 +133,7 @@ struct ConstStringStats {
/// A class that represents statistics for a since lldb_private::Target.
class TargetStats {
public:
- llvm::json::Value ToJSON(Target &target);
+ llvm::json::Value ToJSON(Target &target, bool summary_only = false);
--
@@ -171,9 +171,14 @@ class DebuggerStats {
/// The single target to emit statistics for if non NULL, otherwise dump
/// statistics only for the specified target.
///
+ /// \param summary_only
+ /// If true, only report high level summary statistics without
+ ///
@@ -83,13 +86,15 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_summary_only = false;
}
llvm::ArrayRef GetDefinitions() override {
@@ -86,9 +86,13 @@ class LLDB_API SBTarget {
/// Returns a dump of the collected statistics.
///
+ /// \param[in] summary_only
+ /// If true, only report high level summary statistics without
+ /// targets/modules/breakpoints etc.. details.
+ ///
/// \return
@@ -1599,7 +1599,7 @@ class Target : public
std::enable_shared_from_this,
///
/// \return
/// Returns a JSON value that contains all target metrics.
- llvm::json::Value ReportStatistics();
+ llvm::json::Value ReportStatistics(bool summary_only = false);
---
@@ -197,17 +197,18 @@ SBDebugger SBTarget::GetDebugger() const {
return debugger;
}
-SBStructuredData SBTarget::GetStatistics() {
+SBStructuredData SBTarget::GetStatistics(bool summary_only) {
clayborg wrote:
pass in const `SBStatisticsOptions options` inst
@@ -4962,4 +4962,6 @@ std::recursive_mutex &Target::GetAPIMutex() {
}
/// Get metrics associated with this target in JSON format.
-llvm::json::Value Target::ReportStatistics() { return m_stats.ToJSON(*this); }
+llvm::json::Value Target::ReportStatistics(bool summary_only) {
--
@@ -326,7 +330,7 @@ class LLDB_API SBTarget {
uint32_t GetAddressByteSize();
const char *GetTriple();
-
+
clayborg wrote:
revert whitespace only changes
https://github.com/llvm/llvm-project/pull/80745
___
lld
@@ -100,60 +101,91 @@ llvm::json::Value ConstStringStats::ToJSON() const {
return obj;
}
-json::Value TargetStats::ToJSON(Target &target) {
- CollectStats(target);
+json::Value TargetStats::ToJSON(Target &target, bool summary_only) {
clayborg wrote:
Pass i
@@ -2687,7 +2687,7 @@ uint64_t SymbolFileDWARF::GetDebugInfoSize() {
if (cu == nullptr)
continue;
-SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile();
+SymbolFileDWARFDwo *dwo = cu->GetDwoSymbolFile(false);
clayborg wrote:
This bool might need
@@ -83,13 +86,15 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_summary_only = false;
}
llvm::ArrayRef GetDefinitions() override {
https://github.com/bulbazord edited
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/bulbazord requested changes to this pull request.
Haven't looked over everything yet but this has an ABI-breaking change. Please
revert the existing changes to SBTarget.
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commi
@@ -86,9 +86,13 @@ class LLDB_API SBTarget {
/// Returns a dump of the collected statistics.
///
+ /// \param[in] summary_only
+ /// If true, only report high level summary statistics without
+ /// targets/modules/breakpoints etc.. details.
+ ///
/// \return
@@ -186,6 +186,10 @@ class SymbolFileDWARF : public SymbolFileCommon {
GetMangledNamesForFunction(const std::string &scope_qualified_name,
std::vector &mangled_names) override;
+ // Return total currently loaded debug info.
+ // For cases like
@@ -241,7 +241,7 @@ class DWARFUnit : public UserID {
FileSpec GetFile(size_t file_idx);
FileSpec::Style GetPathStyle();
- SymbolFileDWARFDwo *GetDwoSymbolFile();
+ SymbolFileDWARFDwo *GetDwoSymbolFile(bool load_if_needed = true);
bulbazord wrote:
Inste
MaskRay wrote:
> > There's apparently also wasm32-wasi-preview2 and wasm32-wasi-pthread, which
> > I suppose are equally broken by this change.
>
> Yes, I think so. I think adding these environment types in wasi-libc repo
> could help fix those errors.
If wasm can arbitrary environment types,
https://github.com/jeffreytan81 created
https://github.com/llvm/llvm-project/pull/80767
We have a Python script that needs to locate coredump path during debugging so
that we can retrieve certain metadata files associated with it. Currently,
there is no API for this.
This patch adds a new `SB
https://github.com/jeffreytan81 ready_for_review
https://github.com/llvm/llvm-project/pull/80767
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: None (jeffreytan81)
Changes
We have a Python script that needs to locate coredump path during debugging so
that we can retrieve certain metadata files associated with it. Currently,
there is no API for this.
This patch adds a new `SBProce
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 a7bc9cb6ffa91ff0ebabc45c0c7263c7c2c3a4de
e7af15ff3c1bdd42799b25f76145b8a19739eea5 --
bulbazord wrote:
I'm not sure I understand. Why do you need to get the path to the core file
through the SBAPI? Didn't you also load it through the SBAPI too?
https://github.com/llvm/llvm-project/pull/80767
___
lldb-commits mailing list
lldb-commits@l
@@ -398,6 +398,13 @@ class LLDB_API SBProcess {
/// valid.
lldb::SBProcessInfo GetProcessInfo();
+ /// Return target dump file during postmortem debugging.
+ /// An empty file will be returned for live debugging.
+ ///
+ /// \return
+ /// The target dump file spec
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/80767
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/80767
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -224,7 +224,7 @@ Status ProcessElfCore::DoLoadCore() {
ArchSpec core_arch(m_core_module_sp->GetArchitecture());
target_arch.MergeFrom(core_arch);
GetTarget().SetArchitecture(target_arch);
-
+
clayborg wrote:
revert whitespace only change
https://git
@@ -865,7 +865,7 @@ llvm::Error
ProcessElfCore::parseOpenBSDNotes(llvm::ArrayRef notes) {
/// - NT_SIGINFO - Information about the signal that terminated the process
/// - NT_AUXV - Process auxiliary vector
/// - NT_FILE - Files mapped into memory
-///
+///
c
@@ -398,6 +398,13 @@ class LLDB_API SBProcess {
/// valid.
lldb::SBProcessInfo GetProcessInfo();
+ /// Return target dump file during postmortem debugging.
+ /// An empty file will be returned for live debugging.
clayborg wrote:
```
/// Get the file spe
@@ -398,6 +398,13 @@ class LLDB_API SBProcess {
/// valid.
lldb::SBProcessInfo GetProcessInfo();
+ /// Return target dump file during postmortem debugging.
+ /// An empty file will be returned for live debugging.
+ ///
+ /// \return
+ /// The target dump file spec
@@ -261,7 +261,7 @@ Status ProcessElfCore::DoLoadCore() {
exe_module_spec.GetFileSpec().SetFile(m_nt_file_entries[0].path,
FileSpec::Style::native);
if (exe_module_spec.GetFileSpec()) {
-exe_module_sp = GetTarget()
@@ -1244,6 +1244,17 @@ lldb::SBProcessInfo SBProcess::GetProcessInfo() {
return sb_proc_info;
}
+lldb::SBFileSpec SBProcess::GetCoreFile() {
+ LLDB_INSTRUMENT_VA(this);
+
+ ProcessSP process_sp(GetSP());
+ FileSpec core_file;
+ if (process_sp) {
+core_file = process_
@@ -404,7 +404,7 @@ bool ProcessMachCore::LoadBinariesViaMetadata() {
// LoadCoreFileImges may have set the dynamic loader, e.g. in
// PlatformDarwinKernel::LoadPlatformBinaryAndSetup().
- // If we now have a dynamic loader, save its name so we don't
+ // If we now have
jasonmolenda wrote:
Agreed, if I change this to
```
diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
b/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
index d0bdbe1fd4d..b37544f6dd3 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
+++ b/lldb/source/Plugins/Languag
ZijunZhaoCCK wrote:
> > > There's apparently also wasm32-wasi-preview2 and wasm32-wasi-pthread,
> > > which I suppose are equally broken by this change.
> >
> >
> > Yes, I think so. I think adding these environment types in wasi-libc repo
> > could help fix those errors.
>
> If wasm can arbi
@@ -398,6 +398,13 @@ class LLDB_API SBProcess {
/// valid.
lldb::SBProcessInfo GetProcessInfo();
+ /// Return target dump file during postmortem debugging.
+ /// An empty file will be returned for live debugging.
+ ///
+ /// \return
+ /// The target dump file spec
@@ -1244,6 +1244,17 @@ lldb::SBProcessInfo SBProcess::GetProcessInfo() {
return sb_proc_info;
}
+lldb::SBFileSpec SBProcess::GetCoreFile() {
+ LLDB_INSTRUMENT_VA(this);
+
+ ProcessSP process_sp(GetSP());
+ FileSpec core_file;
+ if (process_sp) {
+core_file = process_
jasonmolenda wrote:
This seems like a useful addition to me, I've had some users of corefiles who
have asked for an SBProcess::IsCore() type of method. (and others asking for
ways to access metadata from the corefile itself via the Process, although I've
never thought about how to do that, ma
@@ -1244,6 +1244,17 @@ lldb::SBProcessInfo SBProcess::GetProcessInfo() {
return sb_proc_info;
}
+lldb::SBFileSpec SBProcess::GetCoreFile() {
+ LLDB_INSTRUMENT_VA(this);
+
+ ProcessSP process_sp(GetSP());
+ FileSpec core_file;
+ if (process_sp) {
+core_file = process_
https://github.com/jasonmolenda edited
https://github.com/llvm/llvm-project/pull/80767
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -398,6 +398,13 @@ class LLDB_API SBProcess {
/// valid.
lldb::SBProcessInfo GetProcessInfo();
+ /// Return target dump file during postmortem debugging.
+ /// An empty file will be returned for live debugging.
+ ///
+ /// \return
+ /// The target dump file spec
jeffreytan81 wrote:
@bulbazord, the scenario is that user directly uses "lldb -c " to
load core file, then the python script is invoked later to fetch metadata,
resolve binaries/symbols etc...
https://github.com/llvm/llvm-project/pull/80767
___
lldb-
https://github.com/jeffreytan81 updated
https://github.com/llvm/llvm-project/pull/80767
>From e7af15ff3c1bdd42799b25f76145b8a19739eea5 Mon Sep 17 00:00:00 2001
From: jeffreytan81
Date: Mon, 5 Feb 2024 15:58:23 -0800
Subject: [PATCH 1/2] Add a new SBProcess:: GetCoreFile() API
---
lldb/include
https://github.com/jeffreytan81 updated
https://github.com/llvm/llvm-project/pull/80767
>From e7af15ff3c1bdd42799b25f76145b8a19739eea5 Mon Sep 17 00:00:00 2001
From: jeffreytan81
Date: Mon, 5 Feb 2024 15:58:23 -0800
Subject: [PATCH 1/3] Add a new SBProcess:: GetCoreFile() API
---
lldb/include
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 78b4e7c5e349d8c101b50affbd260eb109748f8f
e506f292dd07bcdd26a668d9fcf87a258864db95 --
https://github.com/chelcassanova created
https://github.com/llvm/llvm-project/pull/80786
I tried adding a new unit test to the core test
suite (https://github.com/llvm/llvm-project/pull/79533) but it broke the test
suite on AArch64 Linux due to hitting an assertion for calling
`Debugger::Initi
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Chelsea Cassanova (chelcassanova)
Changes
I tried adding a new unit test to the core test
suite (https://github.com/llvm/llvm-project/pull/79533) but it broke the test
suite on AArch64 Linux due to hitting an assertion for calling
`Debugge
https://github.com/aokblast updated
https://github.com/llvm/llvm-project/pull/80785
>From 5f9eac19a45cd4b71afe48643fc0cf8b4b4ab6be Mon Sep 17 00:00:00 2001
From: aokblast
Date: Tue, 6 Feb 2024 10:18:34 +0800
Subject: [PATCH 1/2] [LLDB] Fetch UUID from note section in coredump
---
.../Plugins/
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 0d091206dd656c2a9d31d6088a4aa6f9c2cc7156
2fa99391c097def91369c164195ad2a4a1cd98ed --
jasonmolenda wrote:
Did you mean to include changes to DiagnosticEventTest.cpp and
ProgressReportTest.cpp to use this new global?
https://github.com/llvm/llvm-project/pull/80786
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.l
@@ -83,13 +86,15 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_summary_only = false;
}
llvm::ArrayRef GetDefinitions() override {
https://github.com/chelcassanova created
https://github.com/llvm/llvm-project/pull/80788
Incorporates the changes from
https://github.com/llvm/llvm-project/pull/80786 to use a once_flag from
`TestUtilities` instead of a local flag in order to prevent hitting an
assertion that the debugger was
llvmbot wrote:
@llvm/pr-subscribers-lldb
Author: Chelsea Cassanova (chelcassanova)
Changes
Incorporates the changes from
https://github.com/llvm/llvm-project/pull/80786 to use a once_flag from
`TestUtilities` instead of a local flag in order to prevent hitting an
assertion that the debug
chelcassanova wrote:
I did, I'm adding them as separate patches. DiagnosticEventTest.cpp could
probably go here since it's a simple change but ProgressEventTest doesn't exist
upstream yet since I had to revert so I think that at least should be it's own
PR>
https://github.com/llvm/llvm-projec
https://github.com/jasonmolenda approved this pull request.
LGTM.
https://github.com/llvm/llvm-project/pull/80786
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -130,10 +130,14 @@ struct ConstStringStats {
ConstString::MemoryStats stats = ConstString::GetMemoryStats();
};
+struct StatisticsOptions {
+ bool summary_only = false;
+};
+
/// A class that represents statistics for a since lldb_private::Target.
class TargetStats {
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/80745
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -198,16 +198,24 @@ SBDebugger SBTarget::GetDebugger() const {
}
SBStructuredData SBTarget::GetStatistics() {
+ LLDB_INSTRUMENT_VA(this);
+ SBStatisticsOptions options;
+ options.SetSummaryOnly(false);
clayborg wrote:
This defaults to false right? I wou
@@ -100,60 +101,91 @@ llvm::json::Value ConstStringStats::ToJSON() const {
return obj;
}
-json::Value TargetStats::ToJSON(Target &target) {
- CollectStats(target);
+json::Value TargetStats::ToJSON(Target &target, bool summary_only) {
clayborg wrote:
This f
@@ -0,0 +1,46 @@
+//===-- SBStatisticsOptions.cpp
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -83,13 +86,21 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_summary_only = false;
}
llvm::ArrayRef GetDefinitions() override {
@@ -83,13 +86,21 @@ class CommandObjectStatsDump : public CommandObjectParsed {
void OptionParsingStarting(ExecutionContext *execution_context) override {
m_all_targets = false;
+ m_summary_only = false;
}
llvm::ArrayRef GetDefinitions() override {
@@ -0,0 +1,31 @@
+//===-- SBStatisticsOptions.h ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -75,6 +75,9 @@ class CommandObjectStatsDump : public CommandObjectParsed {
case 'a':
m_all_targets = true;
break;
+ case 's':
+m_summary_only = true;
clayborg wrote:
See comment about storing a different ivar below, then t
@@ -198,16 +198,24 @@ SBDebugger SBTarget::GetDebugger() const {
}
SBStructuredData SBTarget::GetStatistics() {
+ LLDB_INSTRUMENT_VA(this);
+ SBStatisticsOptions options;
+ options.SetSummaryOnly(false);
+ return GetStatistics(options);
+}
+
+SBStructuredData SBTarget::Ge
@@ -0,0 +1,31 @@
+//===-- SBStatisticsOptions.h ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
101 - 166 of 166 matches
Mail list logo