https://github.com/clayborg approved this pull request.
Want to add a [NFC] to the title as well?
https://github.com/llvm/llvm-project/pull/123206
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
@@ -44,12 +44,16 @@ class ProgressEventData : public EventData {
uint64_t GetCompleted() const { return m_completed; }
uint64_t GetTotal() const { return m_total; }
std::string GetMessage() const {
-std::string message = m_title;
-if (!m_details.empty()) {
-
@@ -44,12 +44,16 @@ class ProgressEventData : public EventData {
uint64_t GetCompleted() const { return m_completed; }
uint64_t GetTotal() const { return m_total; }
std::string GetMessage() const {
-std::string message = m_title;
-if (!m_details.empty()) {
-
@@ -44,12 +44,16 @@ class ProgressEventData : public EventData {
uint64_t GetCompleted() const { return m_completed; }
uint64_t GetTotal() const { return m_total; }
std::string GetMessage() const {
-std::string message = m_title;
-if (!m_details.empty()) {
-
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/124648
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
clayborg wrote:
> The reason this code looks the way it does is that we've had crashes when
> trying to read corrupted elf files from memory, where we load the size of the
> elf file from the process memory, find that out that it's size is 935872395
> GB, try to allocate a host buffer of that
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/122541
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg created
https://github.com/llvm/llvm-project/pull/123148
This patch cleans up some code and allows users to not have to specify a size
and now get a more realistic value when reading modules from memory. This patch
is in preparation for starting to have the dynamic
https://github.com/clayborg closed
https://github.com/llvm/llvm-project/pull/123125
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg created
https://github.com/llvm/llvm-project/pull/123125
There was a bug in both the GNU and libc++ library synthetic child providers
when a typedef was used in the type of the variable. Previous code was looking
at the top level typename to try and determine if std
clayborg wrote:
Going to give others time to give feedback before merging.
https://github.com/llvm/llvm-project/pull/123125
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg closed
https://github.com/llvm/llvm-project/pull/113278
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -141,6 +142,25 @@ SymbolLocator *SymbolLocatorDebuginfod::CreateInstance() {
return new SymbolLocatorDebuginfod();
}
+static llvm::StringRef getFileName(const ModuleSpec &module_spec,
+ std::string url_path) {
+ // Check if the URL path
@@ -141,6 +142,25 @@ SymbolLocator *SymbolLocatorDebuginfod::CreateInstance() {
return new SymbolLocatorDebuginfod();
}
+static llvm::StringRef getFileName(const ModuleSpec &module_spec,
+ std::string url_path) {
+ // Check if the URL path
@@ -154,21 +174,29 @@ GetFileForModule(const ModuleSpec &module_spec,
// Grab LLDB's Debuginfod overrides from the
// plugin.symbol-locator.debuginfod.* settings.
PluginProperties &plugin_props = GetGlobalPluginProperties();
- llvm::Expected cache_path_or_err = plugin_pr
https://github.com/clayborg approved this pull request.
Just fix removing {} from single line if statements.
https://github.com/llvm/llvm-project/pull/120814
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/120814
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -56,7 +57,7 @@ class SaveCoreOptions {
std::optional m_file;
std::optional m_style;
lldb::ProcessSP m_process_sp;
- std::unordered_set m_threads_to_save;
+ std::unordered_map m_threads_to_save;
clayborg wrote:
You can remove this change right? You c
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/122541
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -47,6 +46,9 @@ class SaveCoreOptions {
void AddMemoryRegionToSave(const lldb_private::MemoryRegionInfo ®ion);
+ std::optional GetThreadAtIndex(uint32_t idx) const;
clayborg wrote:
We don't need optional if `lldb::ThreadSP` is what is returned, just ret
@@ -111,6 +111,21 @@ class LLDB_API SBSaveCoreOptions {
/// style specific regions.
SBError AddMemoryRegionToSave(const SBMemoryRegionInfo ®ion);
+ /// Get the number of Threads to be saved
+ ///
+ /// \returns
+ /// The count of Threads to be saved.
+ uint32_t Get
@@ -87,12 +87,33 @@ Status SaveCoreOptions::AddThread(lldb::ThreadSP thread_sp)
{
m_process_sp = thread_sp->GetProcess();
}
- m_threads_to_save.insert(thread_sp->GetID());
+ m_threads_to_save.insert({thread_sp->GetID(), thread_sp});
+ m_thread_indexes.push_back(threa
@@ -100,6 +100,19 @@ SBSaveCoreOptions::AddMemoryRegionToSave(const
SBMemoryRegionInfo ®ion) {
return SBError();
}
+uint32_t lldb::SBSaveCoreOptions::GetNumThreads() const {
+ LLDB_INSTRUMENT_VA(this);
+ return m_opaque_up->GetNumThreads();
+}
+
+SBThread SBSaveCoreOption
@@ -111,6 +111,21 @@ class LLDB_API SBSaveCoreOptions {
/// style specific regions.
SBError AddMemoryRegionToSave(const SBMemoryRegionInfo ®ion);
+ /// Get the number of Threads to be saved
+ ///
+ /// \returns
+ /// The count of Threads to be saved.
+ uint32_t Get
@@ -56,8 +58,10 @@ class SaveCoreOptions {
std::optional m_file;
std::optional m_style;
lldb::ProcessSP m_process_sp;
- std::unordered_set m_threads_to_save;
+ std::unordered_map m_threads_to_save;
clayborg wrote:
Not sure if we need this complexity of
@@ -87,12 +87,33 @@ Status SaveCoreOptions::AddThread(lldb::ThreadSP thread_sp)
{
m_process_sp = thread_sp->GetProcess();
}
- m_threads_to_save.insert(thread_sp->GetID());
+ m_threads_to_save.insert({thread_sp->GetID(), thread_sp});
+ m_thread_indexes.push_back(threa
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/122541
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -428,7 +428,7 @@ class Function : public UserID, public SymbolContextScope {
/// The section offset based address for this function.
Function(CompileUnit *comp_unit, lldb::user_id_t func_uid,
lldb::user_id_t func_type_uid, const Mangled &mangled,
-
@@ -2393,10 +2393,29 @@ Function *DWARFASTParserClang::ParseFunctionFromDWARF(
assert(func_type == nullptr || func_type != DIE_IS_BEING_PARSED);
const user_id_t func_user_id = die.GetID();
+
+// The base address of the scope for any of the debugging information
+
@@ -89,8 +89,11 @@ Status
MinidumpFileBuilder::AddHeaderAndCalculateDirectories() {
"Failed to fill in header and directory "
"sections. Written / Expected (%" PRIx64 " / %" PRIx64 ")",
new_offset, m_saved_data_size);
-
return error;
+ if (error.Fai
@@ -89,8 +89,11 @@ Status
MinidumpFileBuilder::AddHeaderAndCalculateDirectories() {
"Failed to fill in header and directory "
"sections. Written / Expected (%" PRIx64 " / %" PRIx64 ")",
new_offset, m_saved_data_size);
-
return error;
+ if (error.Fai
@@ -89,8 +89,11 @@ Status
MinidumpFileBuilder::AddHeaderAndCalculateDirectories() {
"Failed to fill in header and directory "
"sections. Written / Expected (%" PRIx64 " / %" PRIx64 ")",
new_offset, m_saved_data_size);
-
return error;
+ if (error.Fai
@@ -89,8 +89,11 @@ Status
MinidumpFileBuilder::AddHeaderAndCalculateDirectories() {
"Failed to fill in header and directory "
"sections. Written / Expected (%" PRIx64 " / %" PRIx64 ")",
new_offset, m_saved_data_size);
-
return error;
+ if (error.Fai
clayborg wrote:
> @clayborg Thank you, Greg! Lots of that info is not described anywhere, no
> wonder I missed it. Let me try your fixes in my provider, and I will get back
> to you.
>
> By some reason my provider works in CLI lldb, but not in lldb-dap, but I will
> check if your suggestions
clayborg wrote:
I think the patch seems good as it is without needing to differentiate really.
What are we gaining by hiding something that is trying to report progress that
can take some time? Wouldn't we want to know this in a sys diagnose situation?
If a python command runs for a long time,
clayborg wrote:
Another thing that might not be abvious is that an instance of this class lives
as long as the variable lives so as you are stepping in the same function, we
will create one synthetic python instance per raw `lldb.SBValue`. This is why
the `def update(self):` function is so imp
clayborg wrote:
the `def update(self):` is a mandatory function that is automatically called
for you by the LLDB python synthetic child provider when a variable needs to be
updated, so you can't rename it. Since you renamed that to be
`extract_entries`, your synthetic child provider will never
clayborg wrote:
You also are overwriting the original `lldb.SBValue` with the statement
`self.valobj = self.valobj.Dereference()` here:
```
def extract_entries(self):
if self.valobj.type.is_pointer:
self.valobj = self.valobj.Dereference()
```
You never want to do this bec
clayborg wrote:
You don't have a "def update(self):" method in your data formatter. This is
what causes the values to be refetched. I think if you rename "extract_entries"
to be named "update" it will fix your synthetic child provider.
https://github.com/llvm/llvm-project/pull/117755
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/118814
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -29,6 +29,19 @@ STRING_EXTENSION_OUTSIDE(SBValue)
'''An accessor function that returns a children_access() object
which allows lazy member variable access from a lldb.SBValue object.'''
return self.children_access (self)
+def get_member_acce
@@ -473,6 +473,32 @@ class Platform : public PluginInterface {
LLVM_PRETTY_FUNCTION, GetName()));
}
+ /// Search CU for the SDK path the CUs was compiled against.
+ ///
+ /// \param[in] unit The CU
+ ///
+ /// \returns A parsed XcodeSDK object if s
@@ -23,6 +23,13 @@ STRING_EXTENSION_OUTSIDE(SBValue)
if -count <= key < count:
key %= count
return self.sbvalue.GetChildAtIndex(key)
+elif isinstance(key, str):
+if child :=
clayborg wrote:
And the Progress class can check if the an optional instance variable that
contains the minimum time has a value and avoid taking the mutex to keep things
faster even when building this into the Progress class?
https://github.com/llvm/llvm-project/pull/118953
__
https://github.com/clayborg commented:
Can we build this feature into the Progress class by calling an accessor?
Something like:
```
Progress progress("Manually indexing DWARF", module_desc.GetData(),
total_progress);
progress.SetMinimumNotificationTime(std::chrono::milliseconds(10));
```
Then
https://github.com/clayborg updated
https://github.com/llvm/llvm-project/pull/113278
>From dab763afbe46a59020ae10530c062e9420f45605 Mon Sep 17 00:00:00 2001
From: Greg Clayton
Date: Tue, 22 Oct 2024 01:16:40 -0700
Subject: [PATCH 1/3] Make the target's SectionLoadList private.
Lots of code aro
https://github.com/clayborg commented:
This would be easy to test if we expose this via the public API in `SBTarget`.
We don't expose a FindFirstSymbolWithNameAndType, but we can expose maybe:
```
lldb::SBSymbol SBTarget::FindFirstSymbol(const char *name, lldb::SymbolType
type = eSymbolTypeAny)
https://github.com/clayborg closed
https://github.com/llvm/llvm-project/pull/118390
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
clayborg wrote:
You should be able to debug lldb and step through the code that tries to get
the synthetic child provider for the type and watch if fail. You can also step
through the C++ example code from my screen shot and see how it is working to
see what is going wrong and how the two thin
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/118390
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
clayborg wrote:
Can you post a copy of a the python code for the synthetic child provider you
are creating and also how you are registering it with LLDB?
https://github.com/llvm/llvm-project/pull/117755
___
lldb-commits mailing list
lldb-commits@lists
https://github.com/clayborg created
https://github.com/llvm/llvm-project/pull/118390
The ManualDWARFIndex class can create a index cache if the LLDB index cache is
enabled. This used to save the index to the same file, regardless of wether the
cache was a full index (no .debug_names) or a part
clayborg wrote:
https://github.com/user-attachments/assets/b7dbb80c-5f7d-4dd8-a0db-d0b8fe10cf21";>
Still works inside of a structure. Anything else I can try?
https://github.com/llvm/llvm-project/pull/117755
___
lldb-commits mailing list
lldb-commits@
https://github.com/clayborg commented:
None of this should be needed. If we have a child value that is a pointer to a
synthetic value, and we expand that value, we should be showing the synthetic
children via the standard LLDB APIs.
In LLDB way back in the beginning, when we would expand a po
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/114120
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -7,7 +7,12 @@
def __iter__(self):
'''Iterate over all the memory regions in a lldb.SBMemoryRegionInfoList
object.'''
- return lldb_iter(self, 'GetSize', 'GetMemoryRegionAtIndex')
+ import lldb
+ size = self.GetSize()
+ region = lldb.SBMemoryRe
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/117358
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -286,6 +286,22 @@ void ProcessElfCore::UpdateBuildIdForNTFileEntries() {
}
}
+bool ProcessElfCore::GetModuleSpec(const FileSpec &module_file_spec,
+ const ArchSpec &arch,
+ ModuleSpec &module_spec) {
+ m
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
clayborg wrote:
> I'm a bit confused as to how we have a core file but also things are moved in
> memory.
>
> Can you give an explanation of how this occurs? Please add it to the PR
> description.
Will do.
> Also, tests? (which is partly why I ask how this occurs)
Tests are hard to create a
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/117028
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg closed
https://github.com/llvm/llvm-project/pull/117028
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -97,6 +97,9 @@ class ProcessElfCore : public lldb_private::PostMortemProcess
{
bool GetProcessInfo(lldb_private::ProcessInstanceInfo &info) override;
+ // Returns the gnu uuid from matched NT_FILE entry
+ lldb_private::UUID FindBuildId(const llvm::StringRef path) over
@@ -157,6 +157,10 @@ DynamicLoader::GetSectionListFromModule(const ModuleSP
module) const {
ModuleSP DynamicLoader::FindModuleViaTarget(const FileSpec &file) {
Target &target = m_process->GetTarget();
ModuleSpec module_spec(file, target.GetArchitecture());
+ if (UUID uuid
@@ -281,6 +281,13 @@ void ProcessElfCore::UpdateBuildIdForNTFileEntries() {
}
}
+UUID ProcessElfCore::FindBuildId(const llvm::StringRef path) {
clayborg wrote:
Change to overrite `GetModuleSpec` instead.
https://github.com/llvm/llvm-project/pull/117070
___
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -1380,6 +1380,8 @@ class Process : public
std::enable_shared_from_this,
virtual bool GetProcessInfo(ProcessInstanceInfo &info);
+ virtual lldb_private::UUID FindBuildId(const llvm::StringRef path);
+
clayborg wrote:
There is already a function in Proc
@@ -6080,6 +6080,11 @@ bool Process::GetProcessInfo(ProcessInstanceInfo &info) {
return platform_sp->GetProcessInfo(GetID(), info);
}
+lldb_private::UUID Process::FindBuildId(const llvm::StringRef path) {
+ lldb_private::UUID invalid_uuid;
+ return invalid_uuid;
+}
+
-
@@ -1034,7 +1041,8 @@ UUID ProcessElfCore::FindBuidIdInCoreMemory(lldb::addr_t
address) {
std::vector note_bytes;
note_bytes.resize(program_header.p_memsz);
-byte_read = ReadMemory(program_header.p_vaddr, note_bytes.data(),
+const lldb::addr_t program_header_v
clayborg wrote:
The reading of build IDs is tracked in this PR:
https://github.com/llvm/llvm-project/pull/117028
https://github.com/llvm/llvm-project/pull/117070
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
https://github.com/clayborg updated
https://github.com/llvm/llvm-project/pull/117028
>From 37eccb509ea6468879cf530c6952aab7adec4001 Mon Sep 17 00:00:00 2001
From: Greg Clayton
Date: Wed, 20 Nov 2024 10:55:12 -0800
Subject: [PATCH 1/2] Fix loading UUIDs from ELF headers.
A previous patch added
https://github.com/clayborg created
https://github.com/llvm/llvm-project/pull/117028
A previous patch added the ability to load UUID from ELF headers using the
program header and finding PT_NOTE entries. The fix would attempt to read the
data for the PT_NOTE from memory, but it didn't slide th
clayborg wrote:
@labath Your suggestion to use the commands in my test fails on
`buildkite/github-pull-requests/linux-linux-x64` with:
```
RUN: at line 6:
/var/lib/buildkite-agent/builds/linux-56-59b8f5d88-5wwkv-1/llvm-project/github-pull-requests/build/bin/llvm-mc
-triple=x86_64-pc-linux -fil
https://github.com/clayborg updated
https://github.com/llvm/llvm-project/pull/116689
>From 4dbb6fe631926bdcdcb89d981a457dd7599bffad Mon Sep 17 00:00:00 2001
From: Greg Clayton
Date: Mon, 18 Nov 2024 12:11:56 -0800
Subject: [PATCH 1/5] Add support for reading the dynamic symbol table from
PT_DY
clayborg wrote:
@labath I fixed by removing use of `-z nosectionheader` and then ran llvm-strip
as a separate step to ensure the section headers are removed.
https://github.com/llvm/llvm-project/pull/116689
___
lldb-commits mailing list
lldb-commits@l
https://github.com/clayborg updated
https://github.com/llvm/llvm-project/pull/116689
>From 4dbb6fe631926bdcdcb89d981a457dd7599bffad Mon Sep 17 00:00:00 2001
From: Greg Clayton
Date: Mon, 18 Nov 2024 12:11:56 -0800
Subject: [PATCH 1/4] Add support for reading the dynamic symbol table from
PT_DY
https://github.com/clayborg updated
https://github.com/llvm/llvm-project/pull/116689
>From 4dbb6fe631926bdcdcb89d981a457dd7599bffad Mon Sep 17 00:00:00 2001
From: Greg Clayton
Date: Mon, 18 Nov 2024 12:11:56 -0800
Subject: [PATCH 1/3] Add support for reading the dynamic symbol table from
PT_DY
https://github.com/clayborg updated
https://github.com/llvm/llvm-project/pull/116689
>From 4dbb6fe631926bdcdcb89d981a457dd7599bffad Mon Sep 17 00:00:00 2001
From: Greg Clayton
Date: Mon, 18 Nov 2024 12:11:56 -0800
Subject: [PATCH 1/2] Add support for reading the dynamic symbol table from
PT_DY
https://github.com/clayborg created
https://github.com/llvm/llvm-project/pull/116689
Resubmissions of https://github.com/llvm/llvm-project/pull/112596 with buildbot
fixes.
Allow LLDB to parse the dynamic symbol table from an ELF file or memory image
in an ELF file that has no section headers.
clayborg wrote:
> I have reverted this change with
> [f14e1a8](https://github.com/llvm/llvm-project/commit/f14e1a8597f83fa5bbc78befcb7059144d58ff5c)
I found the issue and have a fix.
https://github.com/llvm/llvm-project/pull/112596
___
lldb-commits m
https://github.com/clayborg closed
https://github.com/llvm/llvm-project/pull/112596
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/110065
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/113508
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/clayborg updated
https://github.com/llvm/llvm-project/pull/112596
>From 0ff6ba499bcb04581cf5b77780f769bee05e4aef Mon Sep 17 00:00:00 2001
From: Greg Clayton
Date: Sat, 28 Sep 2024 15:05:37 -0700
Subject: [PATCH 1/3] Add support for reading the dynamic symbol table from
progr
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/110062
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -1600,6 +1600,15 @@ bool Module::MergeArchitecture(const ArchSpec
&arch_spec) {
return SetArchitecture(merged_arch);
}
+void Module::ResetStatistics() {
+ m_symtab_parse_time.reset();
+ m_symtab_index_time.reset();
+ SymbolFile *sym_file = GetSymbolFile();
+ if (sym_
@@ -101,6 +101,9 @@ class LLDB_API SBTarget {
/// A SBStructuredData with the statistics collected.
lldb::SBStructuredData GetStatistics(SBStatisticsOptions options);
+ /// Reset the statistics collected for this target.
clayborg wrote:
Document this
https://github.com/clayborg commented:
So this patch seems to just clear the module + symbol file stats, not any
breakpoint resolve times, etc.
https://github.com/llvm/llvm-project/pull/113723
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
@@ -426,6 +426,8 @@ class LLDB_API SBDebugger {
SBTypeSynthetic GetSyntheticForType(SBTypeNameSpecifier);
+ void ResetStatistics();
clayborg wrote:
Add a header doc comment for this to document what this will do:
- clear all stats for all modules in all t
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/113723
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -1667,6 +1667,12 @@ SBTypeSynthetic
SBDebugger::GetSyntheticForType(SBTypeNameSpecifier type_name) {
DataVisualization::GetSyntheticForType(type_name.GetSP()));
}
+void SBDebugger::ResetStatistics() {
clayborg wrote:
Should we add a `void SBTarget::
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/113723
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -318,6 +318,9 @@ class SymbolFileDWARF : public SymbolFileCommon {
StatsDuration &GetDebugInfoParseTimeRef() { return m_parse_time; }
+ void ResetDebugInfoParseTime() override { m_parse_time.reset(); }
+ void ResetDebugInfoIndexTime() override;
+
clayb
@@ -236,6 +236,27 @@ void
TargetStats::IncreaseSourceRealpathCompatibleCount(uint32_t count) {
bool DebuggerStats::g_collecting_stats = false;
+void DebuggerStats::ResetStatistics(Debugger &debugger, Target *target) {
+ const uint64_t num_modules = target != nullptr
+
@@ -422,6 +422,13 @@ class SymbolFile : public PluginInterface {
/// hasn't been indexed yet, or a valid duration if it has.
virtual StatsDuration::Duration GetDebugInfoIndexTime() { return {}; }
+ /// Reset the time taken to parse the debug information.
+ virtual void R
@@ -422,6 +422,13 @@ class SymbolFile : public PluginInterface {
/// hasn't been indexed yet, or a valid duration if it has.
virtual StatsDuration::Duration GetDebugInfoIndexTime() { return {}; }
+ /// Reset the time taken to parse the debug information.
+ virtual void R
@@ -789,6 +789,7 @@ void Debugger::Destroy(DebuggerSP &debugger_sp) {
(*debugger_sp->GetAsyncErrorStream()) << result.GetErrorData() << '\n';
}
+ DebuggerStats::ResetStatistics(*debugger_sp, nullptr);
clayborg wrote:
We probably don't need to call th
@@ -236,6 +236,27 @@ void
TargetStats::IncreaseSourceRealpathCompatibleCount(uint32_t count) {
bool DebuggerStats::g_collecting_stats = false;
+void DebuggerStats::ResetStatistics(Debugger &debugger, Target *target) {
+ const uint64_t num_modules = target != nullptr
+
@@ -182,6 +182,9 @@ class SymbolFileOnDemand : public lldb_private::SymbolFile {
lldb_private::StatsDuration::Duration GetDebugInfoParseTime() override;
lldb_private::StatsDuration::Duration GetDebugInfoIndexTime() override;
+ void ResetDebugInfoParseTime() override;
+ v
1 - 100 of 1647 matches
Mail list logo