@@ -0,0 +1,65 @@
+//===-- SBAddressRange.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:
@@ -0,0 +1,28 @@
+%extend lldb::SBAddressRangeList {
+#ifdef SWIGPYTHON
+%pythoncode%{
+def __len__(self):
+ '''Return the number of address ranges in a lldb.SBAddressRangeList
object.'''
+ return self.GetSize()
+
+def __iter__(self):
+ '''Iterate over
@@ -0,0 +1,65 @@
+//===-- SBAddressRange.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:
@@ -570,11 +586,13 @@ static void ParseOpenBSDProcInfo(ThreadData _data,
}
llvm::Expected>
-ProcessElfCore::parseSegment(const DataExtractor ) {
+ProcessElfCore::parseSegment(const DataExtractor ,
+ unsigned long segment_size) {
lldb::offset_t
@@ -983,6 +1001,66 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(lldb::addr_t address) {
+ uint8_t buf[4];
+ Status error;
+ size_t byte_read = ReadMemory(address, buf, 4, error);
+ if (byte_read != 4)
+return
@@ -983,6 +1001,66 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(lldb::addr_t address) {
+ uint8_t buf[4];
+ Status error;
+ size_t byte_read = ReadMemory(address, buf, 4, error);
+ if (byte_read != 4)
+return
@@ -983,6 +1001,66 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(lldb::addr_t address) {
+ uint8_t buf[4];
+ Status error;
+ size_t byte_read = ReadMemory(address, buf, 4, error);
+ if (byte_read != 4)
+return
@@ -983,6 +1001,66 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(lldb::addr_t address) {
+ uint8_t buf[4];
+ Status error;
+ size_t byte_read = ReadMemory(address, buf, 4, error);
+ if (byte_read != 4)
+return
@@ -117,6 +117,7 @@ class ProcessElfCore : public
lldb_private::PostMortemProcess {
lldb::addr_t end;
lldb::addr_t file_ofs;
std::string path;
+lldb_private::UUID uuid; //.note.gnu.build-id
clayborg wrote:
Add a comment letting the user know
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/92492
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -570,11 +586,13 @@ static void ParseOpenBSDProcInfo(ThreadData _data,
}
llvm::Expected>
-ProcessElfCore::parseSegment(const DataExtractor ) {
+ProcessElfCore::parseSegment(const DataExtractor ,
+ unsigned long segment_size) {
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/92492
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -983,6 +1001,66 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(lldb::addr_t address) {
+ uint8_t buf[4];
+ Status error;
+ size_t byte_read = ReadMemory(address, buf, 4, error);
+ if (byte_read != 4)
+return
@@ -167,7 +178,8 @@ class ProcessElfCore : public
lldb_private::PostMortemProcess {
AddAddressRangeFromMemoryTagSegment(const elf::ELFProgramHeader );
llvm::Expected>
- parseSegment(const lldb_private::DataExtractor );
+ parseSegment(const lldb_private::DataExtractor ,
https://github.com/clayborg commented:
We have to back out the PeekDieName() patch locally at Meta because it was
crashing us due to this assertion due to .debug_names tables having incorrect
values for type units. Only one type unit will appear in the final file and
type units can have
https://github.com/clayborg closed
https://github.com/llvm/llvm-project/pull/92572
___
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/92572
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -250,10 +268,12 @@ class ProcessInstanceInfo : public ProcessInfo {
lldb::pid_t m_parent_pid = LLDB_INVALID_PROCESS_ID;
lldb::pid_t m_process_group_id = LLDB_INVALID_PROCESS_ID;
lldb::pid_t m_process_session_id = LLDB_INVALID_PROCESS_ID;
- struct timespec m_user_time
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo {
return m_process_session_id != LLDB_INVALID_PROCESS_ID;
}
- struct timespec GetUserTime() const { return m_user_time; }
+ struct timespec GetUserTime() const { return m_user_time.value(); }
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo {
return m_process_session_id != LLDB_INVALID_PROCESS_ID;
}
- struct timespec GetUserTime() const { return m_user_time; }
+ struct timespec GetUserTime() const { return m_user_time.value(); }
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo {
return m_process_session_id != LLDB_INVALID_PROCESS_ID;
}
- struct timespec GetUserTime() const { return m_user_time; }
+ struct timespec GetUserTime() const { return m_user_time.value(); }
https://github.com/clayborg requested changes to this pull request.
We should either truly use `std::optional` and return `std::optional` for
all getters, or just not use them. This patch adds a `bool IsZombieValid()`
which the user must know to call prior to calling `bool IsZombie()`, which
@@ -195,48 +195,66 @@ class ProcessInstanceInfo : public ProcessInfo {
return m_process_session_id != LLDB_INVALID_PROCESS_ID;
}
- struct timespec GetUserTime() const { return m_user_time; }
+ struct timespec GetUserTime() const { return m_user_time.value(); }
@@ -250,10 +268,12 @@ class ProcessInstanceInfo : public ProcessInfo {
lldb::pid_t m_parent_pid = LLDB_INVALID_PROCESS_ID;
lldb::pid_t m_process_group_id = LLDB_INVALID_PROCESS_ID;
lldb::pid_t m_process_session_id = LLDB_INVALID_PROCESS_ID;
- struct timespec m_user_time
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/91544
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -147,96 +148,111 @@ class ProcessInstanceInfo : public ProcessInfo {
ProcessInstanceInfo() = default;
ProcessInstanceInfo(const char *name, const ArchSpec , lldb::pid_t pid)
- : ProcessInfo(name, arch, pid), m_euid(UINT32_MAX), m_egid(UINT32_MAX),
-
https://github.com/clayborg closed
https://github.com/llvm/llvm-project/pull/89868
___
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/90703
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -203,3 +208,38 @@ void AddressRange::DumpDebug(Stream *s) const {
static_cast(m_base_addr.GetSection().get()),
m_base_addr.GetOffset(), GetByteSize());
}
+
+bool AddressRange::GetDescription(Stream *s, Target *target) const {
+ const char *file_name
@@ -0,0 +1,65 @@
+//===-- SBAddressRange.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:
@@ -0,0 +1,216 @@
+"""
+Test SBAddressRange APIs.
+"""
+
+import lldb
+from lldbsuite.test.lldbtest import *
+
+
+class AddressRangeTestCase(TestBase):
+NO_DEBUG_INFO_TESTCASE = True
+
+def setUp(self):
+TestBase.setUp(self)
+
+self.build()
+exe =
@@ -203,3 +208,38 @@ void AddressRange::DumpDebug(Stream *s) const {
static_cast(m_base_addr.GetSection().get()),
m_base_addr.GetOffset(), GetByteSize());
}
+
+bool AddressRange::GetDescription(Stream *s, Target *target) const {
+ const char *file_name
@@ -203,3 +208,38 @@ void AddressRange::DumpDebug(Stream *s) const {
static_cast(m_base_addr.GetSection().get()),
m_base_addr.GetOffset(), GetByteSize());
}
+
+bool AddressRange::GetDescription(Stream *s, Target *target) const {
+ const char *file_name
https://github.com/clayborg requested changes to this pull request.
See inlined comments as the `SBAddressRange::GetDescription()` could have
crashed if we had an address with a no section and we did supply a valid target.
So changes needed:
- add a test for a SBAddressRange object that is
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/92014
___
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.
Thanks for all of the changes. Looks good.
https://github.com/llvm/llvm-project/pull/89868
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/90703
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
clayborg wrote:
> What's an actual test case for this issue? The example given above doesn't
> look like it'd produce entries for the declaration of ios_base? Like here's
> something that looks equivalent, but is complete, and doesn't have a
> DW_IDX_parent on the nested typedef entry in the
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/90703
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -766,6 +771,14 @@ class CommandInterpreter : public Broadcaster,
CommandUsageMap m_command_usages;
StreamString m_transcript_stream;
clayborg wrote:
We should mention in a comment that this will only be filled in if the setting
is true.
https://github.com/clayborg commented:
Just a few comments to fixup as mentioned and this is good to go.
https://github.com/llvm/llvm-project/pull/90703
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
@@ -766,6 +771,14 @@ class CommandInterpreter : public Broadcaster,
CommandUsageMap m_command_usages;
StreamString m_transcript_stream;
+
+ /// Contains a list of handled commands and their details. Each element in
clayborg wrote:
We should mention the
@@ -62,12 +62,15 @@ typedef void *thread_arg_t; // Host thread
argument type
typedef void *thread_result_t; // Host thread result type
typedef void *(*thread_func_t)(void *); // Host thread function type
typedef int pipe_t; // Host
@@ -62,12 +62,15 @@ typedef void *thread_arg_t; // Host thread
argument type
typedef void *thread_result_t; // Host thread result type
typedef void *(*thread_func_t)(void *); // Host thread function type
typedef int pipe_t; // Host
@@ -731,8 +747,12 @@ class Debugger : public
std::enable_shared_from_this,
lldb::TargetSP m_dummy_target_sp;
Diagnostics::CallbackID m_diagnostics_callback_id;
- lldb_private::DebuggerDestroyCallback m_destroy_callback = nullptr;
- void *m_destroy_callback_baton =
@@ -1427,8 +1440,30 @@ void
Debugger::SetLoggingCallback(lldb::LogOutputCallback log_callback,
void Debugger::SetDestroyCallback(
lldb_private::DebuggerDestroyCallback destroy_callback, void *baton) {
- m_destroy_callback = destroy_callback;
- m_destroy_callback_baton
@@ -731,8 +747,12 @@ class Debugger : public
std::enable_shared_from_this,
lldb::TargetSP m_dummy_target_sp;
Diagnostics::CallbackID m_diagnostics_callback_id;
- lldb_private::DebuggerDestroyCallback m_destroy_callback = nullptr;
- void *m_destroy_callback_baton =
@@ -983,6 +1005,73 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const lldb::addr_t address) {
+ uint8_t buf[4];
+ Status error;
+ size_t byte_read = ReadMemory(address, buf, 4, error);
+ if (byte_read != 4)
+
@@ -983,6 +1005,73 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const lldb::addr_t address) {
+ uint8_t buf[4];
+ Status error;
+ size_t byte_read = ReadMemory(address, buf, 4, error);
+ if (byte_read != 4)
+
@@ -1649,6 +1679,26 @@ class Process : public
std::enable_shared_from_this,
lldb::addr_t ReadPointerFromMemory(lldb::addr_t vm_addr, Status );
+ /// Find a string within a memory region.
+ ///
+ /// This function searches for the string represented by the provided
@@ -33,12 +35,17 @@
#include "Plugins/Process/elf-core/RegisterUtilities.h"
#include "ProcessElfCore.h"
#include "ThreadElfCore.h"
+#include "lldb/lldb-types.h"
using namespace lldb_private;
namespace ELF = llvm::ELF;
LLDB_PLUGIN_DEFINE(ProcessElfCore)
+#define
@@ -117,6 +117,13 @@ class ProcessElfCore : public
lldb_private::PostMortemProcess {
lldb::addr_t end;
lldb::addr_t file_ofs;
std::string path;
+lldb_private::UUID uuid; //.note.gnu.build-id
+ };
+
+ struct Section_Note {
+uint32_t namesz;
+uint32_t
@@ -983,6 +1005,73 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const lldb::addr_t address) {
+ uint8_t buf[4];
+ Status error;
+ size_t byte_read = ReadMemory(address, buf, 4, error);
+ if (byte_read != 4)
+
@@ -1649,6 +1679,26 @@ class Process : public
std::enable_shared_from_this,
lldb::addr_t ReadPointerFromMemory(lldb::addr_t vm_addr, Status );
+ /// Find a string within a memory region.
clayborg wrote:
Change to:
```
/// Find bytes within a memory
@@ -1649,6 +1679,26 @@ class Process : public
std::enable_shared_from_this,
lldb::addr_t ReadPointerFromMemory(lldb::addr_t vm_addr, Status );
+ /// Find a string within a memory region.
+ ///
+ /// This function searches for the string represented by the provided
https://github.com/clayborg closed
https://github.com/llvm/llvm-project/pull/92002
___
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/92002
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -6335,16 +6335,51 @@ static void AddRegion(const MemoryRegionInfo ,
bool try_dirty_pages,
ranges.push_back(CreateCoreFileMemoryRange(region));
}
+static void
+SaveOffRegionsWithStackPointers(Process ,
+ const MemoryRegionInfos ,
+
@@ -490,9 +491,12 @@ findStackHelper(const lldb::ProcessSP _sp,
uint64_t rsp) {
return llvm::createStringError(
std::errc::not_supported,
"unable to load stack segment of the process");
-
- const addr_t addr = range_info.GetRange().GetRangeBase();
-
@@ -6335,16 +6335,51 @@ static void AddRegion(const MemoryRegionInfo ,
bool try_dirty_pages,
ranges.push_back(CreateCoreFileMemoryRange(region));
}
+static void
+SaveOffRegionsWithStackPointers(Process ,
+ const MemoryRegionInfos ,
+
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/92002
___
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/92002
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -6335,16 +6335,51 @@ static void AddRegion(const MemoryRegionInfo ,
bool try_dirty_pages,
ranges.push_back(CreateCoreFileMemoryRange(region));
}
+static void
+SaveOffRegionsWithStackPointers(Process ,
+ const MemoryRegionInfos ,
+
@@ -6410,12 +6410,20 @@ GetCoreFileSaveRangesStackOnly(Process ,
if (!reg_ctx_sp)
continue;
const addr_t sp = reg_ctx_sp->GetSP();
+const size_t red_zone = process.GetABI()->GetRedZoneSize();
lldb_private::MemoryRegionInfo sp_region;
if
@@ -731,8 +746,11 @@ class Debugger : public
std::enable_shared_from_this,
lldb::TargetSP m_dummy_target_sp;
Diagnostics::CallbackID m_diagnostics_callback_id;
- lldb_private::DebuggerDestroyCallback m_destroy_callback = nullptr;
- void *m_destroy_callback_baton =
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster,
CommandUsageMap m_command_usages;
StreamString m_transcript_stream;
+
+ /// Contains a list of handled commands, output and error. Each element in
+ /// the list is a dictionary with three keys:
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster,
CommandUsageMap m_command_usages;
StreamString m_transcript_stream;
+
+ /// Contains a list of handled commands, output and error. Each element in
+ /// the list is a dictionary with three keys:
@@ -571,6 +571,15 @@ SBStructuredData SBCommandInterpreter::GetStatistics() {
return data;
}
+SBStructuredData SBCommandInterpreter::GetTranscript() {
+ LLDB_INSTRUMENT_VA(this);
+
+ SBStructuredData data;
+ if (IsValid())
+
@@ -766,6 +768,12 @@ class CommandInterpreter : public Broadcaster,
CommandUsageMap m_command_usages;
StreamString m_transcript_stream;
+
+ /// Contains a list of handled commands, output and error. Each element in
+ /// the list is a dictionary with three keys:
@@ -743,9 +743,28 @@ DebuggerSP
Debugger::CreateInstance(lldb::LogOutputCallback log_callback,
}
void Debugger::HandleDestroyCallback() {
- if (m_destroy_callback) {
-m_destroy_callback(GetID(), m_destroy_callback_baton);
-m_destroy_callback = nullptr;
+
@@ -0,0 +1,102 @@
+//===-- SBAddressRange.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:
clayborg wrote:
> Can we make this less brute force? I believe searching for the Build ID Note
> should be a completely deterministic process, without the need for
> heuristics. You start with the elf header, find the program headers, iterate
> to find the PT_NOTE segment (there could be more
@@ -0,0 +1,78 @@
+//===-- SBAddressRange.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:
@@ -0,0 +1,58 @@
+//===-- SBAddressRangeList.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:
@@ -0,0 +1,13 @@
+%extend lldb::SBAddressRangeList {
+#ifdef SWIGPYTHON
+%pythoncode%{
+def __len__(self):
+ '''Return the number of address ranges in a lldb.SBAddressRangeList
object.'''
+ return self.GetSize()
+
+def __iter__(self):
+ '''Iterate over
@@ -0,0 +1,13 @@
+%extend lldb::SBAddressRangeList {
clayborg wrote:
If we add a method to SBAddressRangeList:
```
bool GetDescription(lldb::SBStream );
```
Then we can add this to this file:
```
STRING_EXTENSION_OUTSIDE(SBAddressRangeList)
```
And then we can
https://github.com/clayborg commented:
We might want SBAddressRange and SBAddressRangeList to have methods:
```
bool GetDescription(lldb::SBStream );
```
Then make sure we add stuff to the .i files so python `str()` calls this.
We do this in many other classes.
@@ -0,0 +1,13 @@
+%extend lldb::SBAddressRangeList {
+#ifdef SWIGPYTHON
+%pythoncode%{
+def __len__(self):
+ '''Return the number of address ranges in a lldb.SBAddressRangeList
object.'''
+ return self.GetSize()
+
+def __iter__(self):
+ '''Iterate over
@@ -983,6 +995,44 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const NT_FILE_Entry entry) {
+ const uint8_t elf_header[4] = {0x7f, 0x45, 0x4c,
+ 0x46}; // ELF file begin with this 4
@@ -983,6 +995,44 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const NT_FILE_Entry entry) {
+ const uint8_t elf_header[4] = {0x7f, 0x45, 0x4c,
+ 0x46}; // ELF file begin with this 4
@@ -983,6 +995,44 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const NT_FILE_Entry entry) {
+ const uint8_t elf_header[4] = {0x7f, 0x45, 0x4c,
+ 0x46}; // ELF file begin with this 4
@@ -983,6 +995,44 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const NT_FILE_Entry entry) {
+ const uint8_t elf_header[4] = {0x7f, 0x45, 0x4c,
+ 0x46}; // ELF file begin with this 4
@@ -983,6 +995,44 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const NT_FILE_Entry entry) {
+ const uint8_t elf_header[4] = {0x7f, 0x45, 0x4c,
+ 0x46}; // ELF file begin with this 4
@@ -977,35 +977,6 @@ class CommandObjectMemoryFind : public CommandObjectParsed
{
Options *GetOptions() override { return _option_group; }
protected:
- class ProcessMemoryIterator {
- public:
-ProcessMemoryIterator(ProcessSP process_sp, lldb::addr_t base)
-:
@@ -3191,6 +3191,33 @@ Status Process::Halt(bool clear_thread_plans, bool
use_run_lock) {
return Status();
}
+lldb::addr_t Process::FastSearch(lldb::addr_t low, lldb::addr_t high,
clayborg wrote:
rename to `FindInMemory`
@@ -983,6 +995,44 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const NT_FILE_Entry entry) {
+ const uint8_t elf_header[4] = {0x7f, 0x45, 0x4c,
+ 0x46}; // ELF file begin with this 4
@@ -117,6 +117,8 @@ class ProcessElfCore : public
lldb_private::PostMortemProcess {
lldb::addr_t end;
lldb::addr_t file_ofs;
std::string path;
+lldb_private::UUID
+uuid; // extracted from .note.gnu.build-id section from core file
@@ -983,6 +995,44 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const NT_FILE_Entry entry) {
+ const uint8_t elf_header[4] = {0x7f, 0x45, 0x4c,
+ 0x46}; // ELF file begin with this 4
@@ -983,6 +995,44 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const NT_FILE_Entry entry) {
+ const uint8_t elf_header[4] = {0x7f, 0x45, 0x4c,
+ 0x46}; // ELF file begin with this 4
@@ -983,6 +995,44 @@ llvm::Error
ProcessElfCore::ParseThreadContextsFromNoteSegment(
}
}
+bool ProcessElfCore::IsElf(const NT_FILE_Entry entry) {
+ const uint8_t elf_header[4] = {0x7f, 0x45, 0x4c,
+ 0x46}; // ELF file begin with this 4
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/92078
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -158,6 +160,15 @@ class ProcessElfCore : public
lldb_private::PostMortemProcess {
// Returns number of thread contexts stored in the core file
uint32_t GetNumThreadContexts();
+ // Populate gnu uuid for each NT_FILE entry
+ void UpdateBuildIdForNTFileEntries();
+
+
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/92078
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
clayborg wrote:
> > I forgot to ask, what is the motivation behind this change? Is there
> > something you can't do with the SBAPI right now or that is better expressed
> > with SBAddressRange and SBAddressRangeList?
>
> Yes, I want to add the following API:
>
> lldb::SBError
@@ -6410,12 +6410,20 @@ GetCoreFileSaveRangesStackOnly(Process ,
if (!reg_ctx_sp)
continue;
const addr_t sp = reg_ctx_sp->GetSP();
+const size_t red_zone = process.GetABI()->GetRedZoneSize();
lldb_private::MemoryRegionInfo sp_region;
if
https://github.com/clayborg requested changes to this pull request.
Change look good for the `GetCoreFileSaveRangesStackOnly`, but we want this to
work for the other two modes `modified-memory` and `full`. So we need to fix
`GetCoreFileSaveRangesFull` and `GetCoreFileSaveRangesDirtyOnly`.
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/92002
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -0,0 +1,63 @@
+//===-- SBAddressRange.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:
@@ -0,0 +1,63 @@
+//===-- SBAddressRange.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:
@@ -0,0 +1,3 @@
+#include
+
+int main() { std::cout << "Hello World!" << std::endl; }
clayborg wrote:
No need to use here right? I would just do a simpler `main`:
```
int main() {
return 0;
}
```
(remove `#include` and use of `std::cout`). This will reduce
1 - 100 of 2117 matches
Mail list logo