https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/142200
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -46,12 +49,206 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+// Helper function to perform an action on each matching plugin.
+// The action callback is given the containing namespace along with plugin info
+// for each matching plugi
@@ -464,6 +466,24 @@ llvm::json::Value DebuggerStats::ReportStatistics(
}
}
+ if (include_plugins) {
+json::Object plugin_stats;
+for (const PluginNamespace &plugin_ns :
+ PluginManager::GetPluginNamespaces()) {
+ json::Array namespace_stats;
+
+
@@ -46,12 +49,206 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+// Helper function to perform an action on each matching plugin.
+// The action callback is given the containing namespace along with plugin info
+// for each matching plugi
@@ -174,12 +174,21 @@ struct StatisticsOptions {
return !GetSummaryOnly();
}
+ void SetIncludePlugins(bool value) { m_include_plugins = value; }
+ bool GetIncludePlugins() const {
+if (m_include_plugins.has_value())
+ return m_include_plugins.value();
+//
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/134418
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -46,12 +49,206 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+// Helper function to perform an action on each matching plugin.
+// The action callback is given the containing namespace along with plugin info
+// for each matching plugi
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/141995
___
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.
Looks good. Watch the buildbot, and please run your tests on both macOS and
linux prior to merging to ensure we don't fail. I am a bit worried about system
runtime plug-ins causing symbols to be loaded on some configs.
https://github.com/
@@ -209,6 +209,26 @@ def test_default_no_run(self):
)
self.assertGreater(module_stats["symbolsLoaded"], 0)
clayborg wrote:
Same here, renamed "symbolTableSymbolCount"
https://github.com/llvm/llvm-project/pull/136795
___
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/136795
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -209,6 +209,26 @@ def test_default_no_run(self):
)
self.assertGreater(module_stats["symbolsLoaded"], 0)
+def test_default_no_run_no_preload_symbols(self):
+"""Test "statistics dump" without running the target and without
+preloadi
clayborg wrote:
Can we renamed `"symbolsLoaded"` to `"symbolTableSymbolCount"` and
`"totalSymbolsLoaded"` to `"totalSymbolTableSymbolCount"`? This would be more
consistent with the other symbol table statistics
https://github.com/llvm/llvm-project/pull/136226
__
@@ -45,9 +49,16 @@ struct Range {
friend bool operator==(const Range &lhs, const Range &rhs) {
return lhs.start == rhs.start && lhs.range_ref == rhs.range_ref;
}
+
+ friend bool operator<(const Range &lhs, const Range &rhs) {
+return lhs.start < rhs.start;
+ }
---
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/136040
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -992,6 +997,8 @@ ModuleList::GetSharedModule(const ModuleSpec &module_spec,
ModuleSP &module_sp,
// By getting the object file we can guarantee that the architecture
// matches
if (module_sp && module_sp->GetObjectFile()) {
+module_sp->GetSymbolLoc
@@ -814,8 +814,16 @@ Status PlatformDarwinKernel::GetSharedModuleKernel(
// append ".dSYM" to the filename for the SymbolFile.
FileSpecList search_paths =
process->GetTarget().GetDebugFileSearchPaths();
-FileSpec dsym_fspec =
-Plu
@@ -297,6 +309,10 @@ Status ProcessKDP::DoConnectRemote(llvm::StringRef
remote_url) {
if (FileSystem::Instance().Exists(module_spec.GetFileSpec())) {
ModuleSP module_sp(new Module(module_spec));
+module_sp->GetSymbolLocatorStatist
@@ -122,6 +122,7 @@ struct ModuleStats {
double symtab_index_time = 0.0;
double debug_parse_time = 0.0;
double debug_index_time = 0.0;
+ llvm::StringMap symbol_locator_time;
clayborg wrote:
We should move `StatisticsMap` into this file and then have `St
@@ -917,9 +917,14 @@ ModuleList::GetSharedModule(const ModuleSpec &module_spec,
ModuleSP &module_sp,
// Fixup the incoming path in case the path points to a valid file, yet the
// arch or UUID (if one was passed in) don't match.
- ModuleSpec located_binary_modulespec =
-
@@ -276,12 +276,24 @@ Status ProcessKDP::DoConnectRemote(llvm::StringRef
remote_url) {
// Lookup UUID locally, before attempting dsymForUUID like action
FileSpecList search_paths =
Target::GetDefaultDebugFileSearchPaths();
-
@@ -243,15 +243,33 @@ ModuleSP DynamicLoader::LoadBinaryWithUUIDAndAddress(
// find an executable and symbol file.
if (!module_sp) {
FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
- module_spec.GetSymbolFileSpec() =
- PluginMan
@@ -243,15 +243,33 @@ ModuleSP DynamicLoader::LoadBinaryWithUUIDAndAddress(
// find an executable and symbol file.
if (!module_sp) {
FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
- module_spec.GetSymbolFileSpec() =
- PluginMan
@@ -956,6 +961,20 @@ class Module : public std::enable_shared_from_this,
bool m_match_name_after_lookup = false;
};
+ class StatisticsMap {
+ public:
+void add(const std::string &key, double value) {
+ if (key.empty())
+return;
+ auto it = map.fin
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/134563
___
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/134339
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -870,6 +870,16 @@ llvm::json::Value CreateThread(lldb::SBThread &thread,
lldb::SBFormat &format) {
return llvm::json::Value(std::move(object));
}
+llvm::json::Array GetThreads(lldb::SBProcess process, lldb::SBFormat &format) {
+ llvm::json::Array threads;
+ const uint3
@@ -52,8 +64,14 @@ void ConfigurationDoneRequestHandler::operator()(
dap.configuration_done_sent = true;
if (dap.stop_at_entry)
SendThreadStoppedEvent(dap);
- else
+ else {
+// Client requests the baseline of currently existing threads after
+// a successful l
@@ -870,6 +870,16 @@ llvm::json::Value CreateThread(lldb::SBThread &thread,
lldb::SBFormat &format) {
return llvm::json::Value(std::move(object));
}
+llvm::json::Array GetThreads(lldb::SBProcess process, lldb::SBFormat &format) {
+ llvm::json::Array threads;
+ const uint3
@@ -969,6 +969,64 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
+Status MinidumpFileBuilder::ReadWriteMemoryInChunks(
+lldb_private::DataBufferHeap &data_buffer,
+const lldb_private::CoreFileMemoryRange &range, uint64_t &bytes_read) {
+
+
https://github.com/clayborg commented:
We should talk about the new API you want to add:
```
virtual std::vector SymbolFile::GetAllObjectFiles();
```
https://github.com/llvm/llvm-project/pull/134563
___
lldb-commits mailing list
lldb-commits@lists.llv
https://github.com/clayborg commented:
I do like the ability to enable/disable any plug-in, but we should only add
support for enabling and disabling plug-ins that are optional. This patch adds
the ability to enable/disable system runtime plug-ins so that is good.
A few things to think about:
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+#define LLDB_OPTIONS_plugin_list
+#include "CommandOptions.inc"
+
+// These option definitions are shared by the plugin list/enable/disable
+// commands.
+class PluginListCo
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+#define LLDB_OPTIONS_plugin_list
+#include "CommandOptions.inc"
+
+// These option definitions are shared by the plugin list/enable/disable
+// commands.
+class PluginListCo
@@ -46,12 +49,344 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+#define LLDB_OPTIONS_plugin_list
+#include "CommandOptions.inc"
+
+// These option definitions are shared by the plugin list/enable/disable
+// commands.
+class PluginListCo
clayborg wrote:
Signals can be listened for via a file descriptor as well. Not sure if this
improves the ability to do things in signal handlers as the default way of
catching signals has all sorts of limitations. If it does improve the safety
and ability to do things in the signal handler, we
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+#define LLDB_OPTIONS_plugin_list
+#include "CommandOptions.inc"
+
+// These option definitions are shared by the plugin list/enable/disable
+// commands.
+class PluginListCo
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/134563
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -422,6 +424,11 @@ class SymbolFile : public PluginInterface {
/// hasn't been indexed yet, or a valid duration if it has.
virtual StatsDuration::Duration GetDebugInfoIndexTime() { return {}; }
+ /// Return the time it took to locate any extra symbol files.
+ ///
+ //
@@ -355,6 +355,8 @@ class SymbolFile : public PluginInterface {
virtual const ObjectFile *GetObjectFile() const = 0;
virtual ObjectFile *GetMainObjectFile() = 0;
+ virtual std::vector GetAllObjectFiles();
+
clayborg wrote:
This call should be in `lldb_pr
@@ -4267,6 +4269,8 @@ const std::shared_ptr
&SymbolFileDWARF::GetDwpSymbolFile() {
// find the correct DWP file, as the Debuginfod plugin uses *only* this
// data to correctly match the DWP file with the binary.
module_spec.GetUUID() = m_objfile_sp->GetUUID()
@@ -4250,11 +4250,13 @@ const std::shared_ptr
&SymbolFileDWARF::GetDwpSymbolFile() {
ModuleSpec module_spec;
module_spec.GetFileSpec() = m_objfile_sp->GetFileSpec();
FileSpec dwp_filespec;
+StatsDuration duration;
for (const auto &symfile : symfiles.files(
@@ -111,7 +111,7 @@ struct ModuleStats {
std::string uuid;
std::string triple;
// Path separate debug info file, or empty if none.
- std::string symfile_path;
+ std::vector symfile_path;
clayborg wrote:
This shouldn't be a vector. The `lldb_private::M
@@ -4267,6 +4269,8 @@ const std::shared_ptr
&SymbolFileDWARF::GetDwpSymbolFile() {
// find the correct DWP file, as the Debuginfod plugin uses *only* this
// data to correctly match the DWP file with the binary.
module_spec.GetUUID() = m_objfile_sp->GetUUID()
clayborg wrote:
> That code has been there at least since the dread reformatting.
>
> I have no idea why past one of us thought it was a good idea to return the
> previous number of threads or the old thread list when you weren't stopped.
> We don't do that with most anything else you ask abou
clayborg wrote:
So after looking further into the, the issue is that
`SBProcess::GetNumThreads()` and `SBProcess::GetThreadAtIndex()` will ignore
the process stop locker and return stale data. If the run lock can't be
acquired, it will not allow the thread list to update, but will return the
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/129307
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -1589,6 +1589,51 @@ class Process : public
std::enable_shared_from_this,
size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size,
Status &error);
+ // Callback definition for read Memory in chunks
+ //
+ // Status, th
@@ -2233,6 +2233,49 @@ size_t Process::ReadMemoryFromInferior(addr_t addr, void
*buf, size_t size,
return bytes_read;
}
+size_t Process::ReadMemoryInChunks(lldb::addr_t vm_addr, void *buf,
+ lldb::addr_t chunk_size, size_t size,
+
@@ -969,6 +969,66 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
+Status MinidumpFileBuilder::ReadWriteMemoryInChunks(
+lldb_private::DataBufferHeap &data_buffer,
+const lldb_private::CoreFileMemoryRange &range, uint64_t &bytes_read) {
+
+
@@ -1589,6 +1589,51 @@ class Process : public
std::enable_shared_from_this,
size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size,
Status &error);
+ // Callback definition for read Memory in chunks
+ //
+ // Status, th
@@ -969,6 +969,66 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
+Status MinidumpFileBuilder::ReadWriteMemoryInChunks(
+lldb_private::DataBufferHeap &data_buffer,
+const lldb_private::CoreFileMemoryRange &range, uint64_t &bytes_read) {
+
+
clayborg wrote:
So the issue from only the lldb-dap side here is VS Code is sending a threads
request, but we have resumed the process upon attach after sending the
configuration done request. So the race condition happens like:
- send configuration done
- send continue to process if stop on e
@@ -1589,6 +1589,48 @@ class Process : public
std::enable_shared_from_this,
size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size,
Status &error);
+ // Callback definition for read Memory in chunks
+ //
+ // Status, th
@@ -2233,6 +2233,40 @@ size_t Process::ReadMemoryFromInferior(addr_t addr, void
*buf, size_t size,
return bytes_read;
}
+size_t Process::ReadMemoryInChunks(lldb::addr_t vm_addr, DataBufferHeap &data,
clayborg wrote:
There is no need to pass in a DataBuffer
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+#define LLDB_OPTIONS_plugin_list
+#include "CommandOptions.inc"
+
+// These option definitions are shared by the plugin list/enable/disable
+// commands.
+class PluginListCo
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/134418
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+#define LLDB_OPTIONS_plugin_list
+#include "CommandOptions.inc"
+
+// These option definitions are shared by the plugin list/enable/disable
+// commands.
+class PluginListCo
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+#define LLDB_OPTIONS_plugin_list
+#include "CommandOptions.inc"
+
+// These option definitions are shared by the plugin list/enable/disable
+// commands.
+class PluginListCo
@@ -46,12 +49,333 @@ class CommandObjectPluginLoad : public CommandObjectParsed
{
}
};
+namespace {
+#define LLDB_OPTIONS_plugin_list
+#include "CommandOptions.inc"
+
+// These option definitions are shared by the plugin list/enable/disable
+// commands.
+class PluginListCo
@@ -1589,6 +1589,48 @@ class Process : public
std::enable_shared_from_this,
size_t ReadMemoryFromInferior(lldb::addr_t vm_addr, void *buf, size_t size,
Status &error);
+ // Callback definition for read Memory in chunks
+ //
+ // Status, th
clayborg wrote:
> Either no one is going to use this except experts, or people will start
> cargo-culting "turn off plugin X and lldb will be faster" and then we get
> "Why doesn't 'obvious thing'" work bug reports, to which the answer would be
> "turn on plugin X" but people may not even know
@@ -969,6 +969,64 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
+Status MinidumpFileBuilder::ReadWriteMemoryInChunks(
+lldb_private::DataBufferHeap &data_buffer,
+const lldb_private::CoreFileMemoryRange &range, uint64_t &bytes_read) {
+
+
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/129307
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -0,0 +1,165 @@
+//===-- GoToTargetsRequestHandler.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: Ap
@@ -1477,32 +1506,32 @@ size_t
ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers,
}
if (idx < section_headers.size())
section_headers.resize(idx);
+ // Sometimes we are able to read the section header memory from an in memory
clayborg
clayborg wrote:
Just a quick comment here for this:
```
/// Get if the symbol file for this module is loaded.
bool IsDebugInfoLoaded() const;
```
This isn't clear what it is returning. What it seems like it should be
returning from the name is "are there debug symbols in this module. But wha
https://github.com/clayborg commented:
I am fine with this being always enabled. I will defer to Jonas to make sure he
is
https://github.com/llvm/llvm-project/pull/133309
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org
@@ -0,0 +1,175 @@
+//===-- WriteMemoryRequestHandler.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: Ap
@@ -0,0 +1,175 @@
+//===-- WriteMemoryRequestHandler.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: Ap
@@ -0,0 +1,175 @@
+//===-- WriteMemoryRequestHandler.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: Ap
@@ -0,0 +1,175 @@
+//===-- WriteMemoryRequestHandler.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: Ap
@@ -0,0 +1,175 @@
+//===-- WriteMemoryRequestHandler.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: Ap
@@ -0,0 +1,175 @@
+//===-- WriteMemoryRequestHandler.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: Ap
@@ -0,0 +1,175 @@
+//===-- WriteMemoryRequestHandler.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: Ap
@@ -0,0 +1,175 @@
+//===-- WriteMemoryRequestHandler.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: Ap
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/131820
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -0,0 +1,165 @@
+//===-- GoToTargetsRequestHandler.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: Ap
@@ -0,0 +1,165 @@
+//===-- GoToTargetsRequestHandler.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: Ap
@@ -0,0 +1,165 @@
+//===-- GoToTargetsRequestHandler.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: Ap
@@ -0,0 +1,165 @@
+//===-- GoToTargetsRequestHandler.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: Ap
@@ -77,6 +77,27 @@ enum class PacketStatus {
enum class ReplMode { Variable = 0, Command, Auto };
+class Gotos {
+public:
+ /// \return the line_entry corresponding with \p id
+ ///
+ /// If \p id is invalid std::nullopt is returned.
+ std::optional GetLineEntry(uint64_t
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/130503
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -962,28 +962,43 @@ llvm::json::Value CreateThreadStopped(DAP &dap,
lldb::SBThread &thread,
body.try_emplace("reason", "step");
break;
case lldb::eStopReasonBreakpoint: {
-ExceptionBreakpoint *exc_bp = dap.GetExceptionBPFromStopReason(thread);
+const auto *
@@ -392,9 +391,55 @@ struct DAP {
void SetThreadFormat(llvm::StringRef format);
- InstructionBreakpoint *GetInstructionBreakpoint(const lldb::break_id_t
bp_id);
+ template
+ BreakpointType *GetBreakpointFromStopReason(lldb::SBThread &thread) {
+// Check to see if h
@@ -1477,32 +1506,32 @@ size_t
ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers,
}
if (idx < section_headers.size())
section_headers.resize(idx);
+ // Sometimes we are able to read the section header memory from an in memory
clayborg
@@ -1477,32 +1506,32 @@ size_t
ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers,
}
if (idx < section_headers.size())
section_headers.resize(idx);
+ // Sometimes we are able to read the section header memory from an in memory
clayborg
https://github.com/clayborg commented:
Pretty good start. There can be more than one breakpoint at a location and we
need to be sure we test these cases. Like we can have an exception breakpoint
(which might be at `cxa_throw`) and we can have a function breakpoint for this
as well. We need to
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
+Status MinidumpFileBuilder::ReadWriteMemoryInChunks(
+const std::unique_ptr &data_up,
+const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) {
+ if (!data_up)
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/129593
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
+Status MinidumpFileBuilder::ReadWriteMemoryInChunks(
+const std::unique_ptr &data_up,
+const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) {
+ if (!data_up)
@@ -969,12 +969,89 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
-static uint64_t
-GetLargestRangeSize(const std::vector &ranges) {
- uint64_t max_size = 0;
- for (const auto &core_range : ranges)
-max_size = std::max(max_size, core_range.ran
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
+Status MinidumpFileBuilder::ReadWriteMemoryInChunks(
+const std::unique_ptr &data_up,
+const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) {
+ if (!data_up)
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
+Status MinidumpFileBuilder::ReadWriteMemoryInChunks(
+const std::unique_ptr &data_up,
+const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) {
@@ -142,6 +142,13 @@ class MinidumpFileBuilder {
lldb_private::Status AddDirectory(llvm::minidump::StreamType type,
uint64_t stream_size);
lldb::offset_t GetCurrentDataEndOffset() const;
+
+ // Read a memory region from the process and w
@@ -1003,18 +1080,15 @@
MinidumpFileBuilder::AddMemoryList_32(std::vector &ranges,
++region_index;
progress.Increment(1, "Adding Memory Range " + core_range.Dump());
-const size_t bytes_read =
-m_process_sp->ReadMemory(addr, data_up->GetBytes(), size, erro
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
+Status MinidumpFileBuilder::ReadWriteMemoryInChunks(
+const std::unique_ptr &data_up,
clayborg wrote:
Change this to a `lldb_private::DataBufferHeap &data`. Unle
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/129307
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -969,12 +969,89 @@ Status MinidumpFileBuilder::DumpDirectories() const {
return error;
}
-static uint64_t
-GetLargestRangeSize(const std::vector &ranges) {
- uint64_t max_size = 0;
- for (const auto &core_range : ranges)
-max_size = std::max(max_size, core_range.ran
@@ -1088,6 +1157,8 @@
MinidumpFileBuilder::AddMemoryList_64(std::vector &ranges,
list_header.BaseRVA = memory_ranges_base_rva;
m_data.AppendData(&list_header, sizeof(llvm::minidump::Memory64ListHeader));
+ auto data_up = std::make_unique(
+ std::min(GetLargestRangeS
1 - 100 of 1774 matches
Mail list logo