@@ -53,6 +53,30 @@ class LLDB_API SBSaveCoreOptions {
/// \return The output file spec.
SBFileSpec GetOutputFile() const;
+ /// Add a thread to save in the core file.
+ ///
+ /// \param thread_id The thread ID to save.
+ void AddThread(lldb::tid_t thread_id);
-
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/100443
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -32,12 +33,21 @@ class SaveCoreOptions {
void SetOutputFile(lldb_private::FileSpec file);
const std::optional GetOutputFile() const;
+ void AddThread(lldb::tid_t tid);
+ bool RemoveThread(lldb::tid_t tid);
+ size_t GetNumThreads() const;
+ int64_t GetThreadAtIndex(s
@@ -53,6 +53,30 @@ class LLDB_API SBSaveCoreOptions {
/// \return The output file spec.
SBFileSpec GetOutputFile() const;
+ /// Add a thread to save in the core file.
+ ///
+ /// \param thread_id The thread ID to save.
+ void AddThread(lldb::tid_t thread_id);
+
+ ///
@@ -46,8 +46,59 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+void SaveCoreOptions::AddThread(lldb::tid_t tid) {
+ if (m_threads_to_save.count(tid) == 0)
+m_threads_to_save.emplace(tid);
+}
+
+bool SaveCoreOptions::RemoveThread(lldb::tid_t tid) {
+ if (
@@ -46,8 +46,59 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+void SaveCoreOptions::AddThread(lldb::tid_t tid) {
+ if (m_threads_to_save.count(tid) == 0)
+m_threads_to_save.emplace(tid);
clayborg wrote:
No need to check the count, and n
@@ -46,8 +46,59 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+void SaveCoreOptions::AddThread(lldb::tid_t tid) {
+ if (m_threads_to_save.count(tid) == 0)
+m_threads_to_save.emplace(tid);
+}
+
+bool SaveCoreOptions::RemoveThread(lldb::tid_t tid) {
+ if (
@@ -53,6 +53,30 @@ class LLDB_API SBSaveCoreOptions {
/// \return The output file spec.
SBFileSpec GetOutputFile() const;
+ /// Add a thread to save in the core file.
+ ///
+ /// \param thread_id The thread ID to save.
+ void AddThread(lldb::tid_t thread_id);
+
+ ///
@@ -46,8 +46,59 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+void SaveCoreOptions::AddThread(lldb::tid_t tid) {
+ if (m_threads_to_save.count(tid) == 0)
+m_threads_to_save.emplace(tid);
+}
+
+bool SaveCoreOptions::RemoveThread(lldb::tid_t tid) {
+ if (
@@ -46,8 +46,59 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+void SaveCoreOptions::AddThread(lldb::tid_t tid) {
+ if (m_threads_to_save.count(tid) == 0)
+m_threads_to_save.emplace(tid);
+}
+
+bool SaveCoreOptions::RemoveThread(lldb::tid_t tid) {
+ if (
@@ -32,12 +33,21 @@ class SaveCoreOptions {
void SetOutputFile(lldb_private::FileSpec file);
const std::optional GetOutputFile() const;
+ void AddThread(lldb::tid_t tid);
+ bool RemoveThread(lldb::tid_t tid);
+ size_t GetNumThreads() const;
+ int64_t GetThreadAtIndex(s
@@ -46,8 +46,59 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+void SaveCoreOptions::AddThread(lldb::tid_t tid) {
+ if (m_threads_to_save.count(tid) == 0)
+m_threads_to_save.emplace(tid);
+}
+
+bool SaveCoreOptions::RemoveThread(lldb::tid_t tid) {
+ if (
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/100443
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -6622,7 +6623,7 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP
&process_sp,
LC_THREAD_data.SetByteOrder(byte_order);
}
for (uint32_t thread_idx = 0; thread_idx < num_threads; ++thread_idx) {
- ThreadSP thread_sp(thread_list.GetThr
@@ -32,12 +33,24 @@ class SaveCoreOptions {
void SetOutputFile(lldb_private::FileSpec file);
const std::optional GetOutputFile() const;
+ Status SetProcess(lldb::ProcessSP process_sp);
+
+ Status AddThread(lldb_private::Thread *thread);
+ bool RemoveThread(lldb_private:
@@ -6608,8 +6608,9 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP
&process_sp,
mach_header.ncmds = segment_load_commands.size();
mach_header.flags = 0;
mach_header.reserved = 0;
-ThreadList &thread_list = process_sp->GetThreadList();
-
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp = std::nullopt;
clayborg
@@ -602,17 +603,17 @@ Status MinidumpFileBuilder::AddThreadList() {
return error;
llvm::support::ulittle32_t thread_count =
- static_cast(thread_list.GetSize());
+ static_cast(thread_list.size());
m_data.AppendData(&thread_count, sizeof(llvm::support::ulittl
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp = std::nullopt;
+return error;
+ }
+
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp = std::nullopt;
+return error;
+ }
+
@@ -53,6 +54,26 @@ class LLDB_API SBSaveCoreOptions {
/// \return The output file spec.
SBFileSpec GetOutputFile() const;
+ /// Set the process to save, or unset if supplied with a null process.
+ ///
+ /// \param process The process to save.
+ /// \return Success if p
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp = std::nullopt;
+return error;
+ }
+
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp = std::nullopt;
+return error;
+ }
+
@@ -6730,7 +6731,7 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP
&process_sp,
StructuredData::ArraySP threads(
std::make_shared());
for (uint32_t thread_idx = 0; thread_idx < num_threads; ++thread_idx) {
- ThreadSP thread_sp(threa
@@ -602,17 +603,17 @@ Status MinidumpFileBuilder::AddThreadList() {
return error;
llvm::support::ulittle32_t thread_count =
- static_cast(thread_list.GetSize());
+ static_cast(thread_list.size());
m_data.AppendData(&thread_count, sizeof(llvm::support::ulittl
@@ -158,7 +158,7 @@ class LLDB_API SBProcess {
lldb::SBError Destroy();
- lldb::SBError Continue();
+ lldb::SBError Continue(RunDirection direction = RunDirection::eRunForward);
clayborg wrote:
@jimingham: do you want all process control function to rema
@@ -170,7 +170,7 @@ class DWARFUnit : public UserID {
/// both cases correctly and avoids crashes.
DWARFCompileUnit *GetSkeletonUnit();
- void SetSkeletonUnit(DWARFUnit *skeleton_unit);
+ bool LinkToSkeletonUnit(DWARFUnit &skeleton_unit);
clayborg wrote:
@@ -718,13 +720,11 @@ DWARFCompileUnit *DWARFUnit::GetSkeletonUnit() {
return llvm::dyn_cast_or_null(m_skeleton_unit);
}
-void DWARFUnit::SetSkeletonUnit(DWARFUnit *skeleton_unit) {
- // If someone is re-setting the skeleton compile unit backlink, make sure
- // it is sett
https://github.com/clayborg commented:
My main questions is do we actually use wildcards a lot? In normal type query
matches, we can ask for exact matches where everything is specified, or the
user types some string like `a::b::iterator` where we don't know what any of
the items are. If exact
@@ -170,7 +170,7 @@ class DWARFUnit : public UserID {
/// both cases correctly and avoids crashes.
DWARFCompileUnit *GetSkeletonUnit();
- void SetSkeletonUnit(DWARFUnit *skeleton_unit);
+ bool LinkToSkeletonUnit(DWARFUnit &skeleton_unit);
clayborg wrote:
@@ -718,13 +720,11 @@ DWARFCompileUnit *DWARFUnit::GetSkeletonUnit() {
return llvm::dyn_cast_or_null(m_skeleton_unit);
}
-void DWARFUnit::SetSkeletonUnit(DWARFUnit *skeleton_unit) {
- // If someone is re-setting the skeleton compile unit backlink, make sure
- // it is sett
https://github.com/clayborg commented:
All changes look good as is, just one inline question about maybe not setting
the error if we detect the .dwo files are both empty (if it is possible to do).
https://github.com/llvm/llvm-project/pull/100577
___
l
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/100577
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -97,12 +97,14 @@ void DWARFUnit::ExtractUnitDIEIfNeeded() {
*m_dwo_id, m_first_die.GetOffset()));
return; // Can't fetch the compile unit from the dwo file.
}
- // If the skeleton compile unit gets its unit DIE parsed first, then this
- // will fill in the DW
@@ -6621,29 +6624,28 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP
&process_sp,
LC_THREAD_data.SetAddressByteSize(addr_byte_size);
LC_THREAD_data.SetByteOrder(byte_order);
}
-for (uint32_t thread_idx = 0; thread_idx < num_threads;
@@ -53,6 +54,27 @@ class LLDB_API SBSaveCoreOptions {
/// \return The output file spec.
SBFileSpec GetOutputFile() const;
+ /// Set the process to save, or unset if supplied with a null process.
+ ///
+ /// \param process The process to save.
+ /// \return Success if p
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp = nullptr;
clayborg wrote
@@ -6668,6 +6676,18 @@ Status
Process::CalculateCoreFileSaveRanges(lldb::SaveCoreStyle core_style,
return Status(); // Success!
}
+std::vector
+Process::CalculateCoreFileThreadList(const SaveCoreOptions &core_options) {
+ std::vector thread_list;
+ for (const auto &thread
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp = nullptr;
+return error;
+ }
+
+ if
@@ -6729,8 +6731,7 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP
&process_sp,
std::make_shared());
StructuredData::ArraySP threads(
std::make_shared());
-for (uint32_t thread_idx = 0; thread_idx < num_threads; ++thread_idx) {
-
@@ -53,6 +54,27 @@ class LLDB_API SBSaveCoreOptions {
/// \return The output file spec.
SBFileSpec GetOutputFile() const;
+ /// Set the process to save, or unset if supplied with a null process.
clayborg wrote:
change `null process` to a `default constru
@@ -6621,29 +6624,28 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP
&process_sp,
LC_THREAD_data.SetAddressByteSize(addr_byte_size);
LC_THREAD_data.SetByteOrder(byte_order);
}
-for (uint32_t thread_idx = 0; thread_idx < num_threads;
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp = nullptr;
+return error;
+ }
+
+ if
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp = nullptr;
+return error;
+ }
+
+ if
@@ -46,8 +48,79 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp = nullptr;
+return error;
+ }
+
+ if
@@ -46,8 +46,59 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+void SaveCoreOptions::AddThread(lldb::tid_t tid) {
+ if (m_threads_to_save.count(tid) == 0)
+m_threads_to_save.emplace(tid);
+}
+
+bool SaveCoreOptions::RemoveThread(lldb::tid_t tid) {
+ if (
@@ -6608,8 +6610,9 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP
&process_sp,
mach_header.ncmds = segment_load_commands.size();
mach_header.flags = 0;
mach_header.reserved = 0;
-ThreadList &thread_list = process_sp->GetThreadList();
-
@@ -26,3 +26,14 @@ def test_default_corestyle_behavior(self):
"""Test that the default core style is unspecified."""
options = lldb.SBSaveCoreOptions()
self.assertEqual(options.GetStyle(), lldb.eSaveCoreUnspecified)
+
+def test_adding_and_removing_th
https://github.com/clayborg created
https://github.com/llvm/llvm-project/pull/100900
This is the first part in improving ELF core files in LLDB. This first patch
teaches LLDB to get as much data as possible from an in memory ELF image where
we don't have section headers mapped into the process
clayborg wrote:
If anyone knows any ELF file experts, please add them as reviewers
https://github.com/llvm/llvm-project/pull/100900
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
clayborg wrote:
ok, I will break this up to make it easier to review.
https://github.com/llvm/llvm-project/pull/100900
___
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/101086
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -104,6 +105,25 @@ using ModuleListStream =
detail::ListStream;
using ThreadListStream = detail::ListStream;
using MemoryListStream = detail::ListStream;
+/// Memory64ListStream minidump stream.
+struct Memory64ListStream : public Stream {
+ std::vector Entries;
+ yaml::B
https://github.com/clayborg requested changes to this pull request.
There must be some minidump yaml tests somewhere. We should add some to test
the YAML support. Also need to test for multiple MemoryDescriptor_64 entries in
a file using your new YAML.
https://github.com/llvm/llvm-project/pull
@@ -154,3 +155,17 @@ MinidumpFile::create(MemoryBufferRef Source) {
return std::unique_ptr(
new MinidumpFile(Source, Hdr, *ExpectedStreams, std::move(StreamMap)));
}
+
+Expected> MinidumpFile::getMemory64List() const {
+ Expected MemoryList64 =
getMemoryList64Header()
@@ -154,3 +155,17 @@ MinidumpFile::create(MemoryBufferRef Source) {
return std::unique_ptr(
new MinidumpFile(Source, Hdr, *ExpectedStreams, std::move(StreamMap)));
}
+
+Expected> MinidumpFile::getMemory64List() const {
+ Expected MemoryList64 =
getMemoryList64Header()
https://github.com/clayborg created
https://github.com/llvm/llvm-project/pull/101237
This patch improves the ability of a ObjectFileELF instance to read the
.dynamic section. It adds the ability to read the .dynamic section from a ELF
file that is read from memory, cleans up the usage of the .
https://github.com/clayborg closed
https://github.com/llvm/llvm-project/pull/100900
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
clayborg wrote:
I am going to split this up. New PR with just .dynamic changes is here:
https://github.com/llvm/llvm-project/pull/101237
https://github.com/llvm/llvm-project/pull/100900
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https:/
https://github.com/clayborg updated
https://github.com/llvm/llvm-project/pull/101237
>From 6ef64acd518afe8bdc42c5042f35c857be96e3b4 Mon Sep 17 00:00:00 2001
From: Greg Clayton
Date: Tue, 30 Jul 2024 13:37:44 -0700
Subject: [PATCH 1/2] Impove ObjectFileELF's .dynamic parsing and usage.
This pat
clayborg wrote:
Can we add a cmake settings that allows users to add custom target names that
will be added? I would love to use this for my common projects like:
```
-DCMAKE_LLVM_XCODE_TARGETS=lldb;llvm-dwarfdump;llvm-gsymutil;lld
```
And it would add those top level targets?
https://github.co
clayborg wrote:
Great! That will be very useful.
https://github.com/llvm/llvm-project/pull/101243
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -1423,3 +1423,11 @@ endif()
if (LLVM_INCLUDE_UTILS AND LLVM_INCLUDE_TOOLS)
add_subdirectory(utils/llvm-locstats)
endif()
+
+if (XCODE)
+ set(LLVM_XCODE_EXTRA_TARGET_SCHEMES "" CACHE STRING "Specifies an extra list
of targets to turn into schemes")
claybo
@@ -136,6 +136,22 @@ static size_t layout(BlobAllocator &File,
MinidumpYAML::ExceptionStream &S) {
return DataEnd;
}
+static size_t layout(BlobAllocator &File, MinidumpYAML::Memory64ListStream &S)
{
+ size_t BaseRVA = File.tell() + sizeof(minidump::Memory64ListHeader);
--
@@ -336,3 +336,51 @@ TEST(MinidumpYAML, ExceptionStream_ExtraParameter) {
0xab, 0xad, 0xca, 0xfe}),
*ExpectedContext);
}
+
+TEST(MinidumpYAML, MemoryRegion_64bit) {
+ SmallString<0> Storage;
+ auto ExpectedFile = toBinary(Storage, R"
@@ -336,3 +336,51 @@ TEST(MinidumpYAML, ExceptionStream_ExtraParameter) {
0xab, 0xad, 0xca, 0xfe}),
*ExpectedContext);
}
+
+TEST(MinidumpYAML, MemoryRegion_64bit) {
+ SmallString<0> Storage;
+ auto ExpectedFile = toBinary(Storage, R"
@@ -152,15 +165,15 @@ class MinidumpFile : public Binary {
}
/// Return a slice of the given data array, with bounds checking.
- static Expected> getDataSlice(ArrayRef Data,
- size_t Offset, size_t Size);
+ static Expected
clayborg wrote:
Does look like this is working correctly:
```
$ minidump.py /tmp/md.dmp
MINIDUMP_HEADER:
Signature = 0x504d444d
Version= 0xa793
NumberOfStreams= 0x0001
StreamDirectoryRva = 0x0020
CheckSum = 0x
TimeDateStamp = 0x
clayborg wrote:
```
0x07fcf081828b - 0x07fcf0818283 = 8 (from MemoryRanges[0]) and there
are only 5 bytes in the file's hexdump
```
So the data for MemoryRanges[1] will be off since it will think it starts at:
```
BaseRva + 8 = 0x5c + 8 = 0x0064
```
And that points to the last 2 byte
clayborg wrote:
So the BaseRVA does look good, the memory range is being set to 8 bytes instead
of 5 for each data.
https://github.com/llvm/llvm-project/pull/101272
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-b
https://github.com/clayborg approved this pull request.
Looks good! This will be very useful for core files.
https://github.com/llvm/llvm-project/pull/101361
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
@@ -3664,7 +3730,27 @@ llvm::ArrayRef
ObjectFileELF::ProgramHeaders() {
}
DataExtractor ObjectFileELF::GetSegmentData(const ELFProgramHeader &H) {
- return DataExtractor(m_data, H.p_offset, H.p_filesz);
+ // Try and read the program header from our cached m_data which can c
@@ -3704,3 +3790,83 @@ ObjectFileELF::MapFileDataWritable(const FileSpec &file,
uint64_t Size,
return FileSystem::Instance().CreateWritableDataBuffer(file.GetPath(), Size,
Offset);
}
+
+std::optional ObjectFileELF::Get
@@ -0,0 +1,58 @@
+// REQUIRES: system-linux, native
clayborg wrote:
Adding support for memory ELF files is my primary concern with this patch as
you know. Testing that in memory ELF files work as well as they can and that we
can find the DT_DEBUG is the primary
@@ -384,6 +392,9 @@ class ObjectFileELF : public lldb_private::ObjectFile {
/// ELF dependent module dump routine.
void DumpDependentModules(lldb_private::Stream *s);
+ /// ELF dump the .dynamic section
+ void DumpELFDynamic(lldb_private::Stream *s);
cla
https://github.com/clayborg updated
https://github.com/llvm/llvm-project/pull/101237
>From f0cd3ef613b2da145b14a3d79d6810cc19e9b198 Mon Sep 17 00:00:00 2001
From: Greg Clayton
Date: Tue, 30 Jul 2024 13:37:44 -0700
Subject: [PATCH 1/3] Impove ObjectFileELF's .dynamic parsing and usage.
This pat
https://github.com/clayborg updated
https://github.com/llvm/llvm-project/pull/101237
>From f0cd3ef613b2da145b14a3d79d6810cc19e9b198 Mon Sep 17 00:00:00 2001
From: Greg Clayton
Date: Tue, 30 Jul 2024 13:37:44 -0700
Subject: [PATCH 1/4] Impove ObjectFileELF's .dynamic parsing and usage.
This pat
https://github.com/clayborg commented:
Code looks fine to me now. I will let Pavel give the final OK as I don't know
much about the YAML layering in LLVM.
https://github.com/llvm/llvm-project/pull/101272
___
lldb-commits mailing list
lldb-commits@list
@@ -10,6 +10,7 @@
#define LLDB_API_SBSAVECOREOPTIONS_H
#include "lldb/API/SBDefines.h"
+#include "lldb/API/SBThread.h"
clayborg wrote:
probably should include SBProcess.h here as well since we are using it.
https://github.com/llvm/llvm-project/pull/100443
__
https://github.com/clayborg requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/100443
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -9,6 +9,8 @@
#include "lldb/API/SBSaveCoreOptions.h"
#include "lldb/API/SBError.h"
#include "lldb/API/SBFileSpec.h"
+#include "lldb/API/SBProcess.h"
+#include "lldb/API/SBThread.h"
clayborg wrote:
remove these, they are in the `SBSaveCoreOptions.h` header f
@@ -46,8 +48,83 @@ SaveCoreOptions::GetOutputFile() const {
return m_file;
}
+Status SaveCoreOptions::SetProcess(lldb::ProcessSP process_sp) {
+ Status error;
+ if (!process_sp) {
+ClearProcessSpecificData();
+m_process_sp.reset();
+return error;
+ }
+
+ if (
@@ -255,6 +256,8 @@ class LLDB_API SBThread {
lldb::ExecutionContextRefSP m_opaque_sp;
+ lldb::ThreadSP get_sp() const;
clayborg wrote:
Rename to GetSP to match what is in SBProcess. I saw code below that calls
these accessors in lldb/source/API/SBSaveCo
@@ -32,13 +33,25 @@ class SaveCoreOptions {
void SetOutputFile(lldb_private::FileSpec file);
const std::optional GetOutputFile() const;
+ Status SetProcess(lldb::ProcessSP process_sp);
+
+ Status AddThread(lldb::ThreadSP thread_sp);
+ bool RemoveThread(lldb::ThreadSP th
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/100443
___
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.
Do the variable rename and all good
https://github.com/llvm/llvm-project/pull/100443
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-
https://github.com/clayborg commented:
Might actually be nice to make the SaveCoreOptions non const. Why? Because
clients could see what the settings were set to if a plug-in modifies or
overrides certain settings.
https://github.com/llvm/llvm-project/pull/101770
__
https://github.com/clayborg approved this pull request.
https://github.com/llvm/llvm-project/pull/101770
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
clayborg wrote:
> @hokein Can you share the build command you got to trigger the above msan
> error? I'm having trouble reproducing your issue
And was your build using msan? or just a regular build? I can see a msan build
fail to create a core file due to it crashing, and then you might see th
@@ -29,3 +29,15 @@ and executable type. If the architecture or executable type
do not match,
a suitable platform will be found automatically."
) lldb::SBPlatform;
+
+%feature("docstring", "
+Create a platform instance using a specific platform plugin name, debugger,
+script n
@@ -180,7 +184,19 @@ class CommandObjectPlatformSelect : public
CommandObjectParsed {
m_interpreter, ArchSpec(), select, error, platform_arch));
if (platform_sp) {
GetDebugger().GetPlatformList().SetSelectedPlatform(platform_sp);
-
+ Opti
@@ -100,6 +99,9 @@ class LLDB_API SBPlatform {
SBPlatform(const char *platform_name);
+ SBPlatform(const char *platform_name, const SBDebugger &debugger,
+ const char *script_name, const SBStructuredData &dict);
+
clayborg wrote:
is `script_na
@@ -0,0 +1,108 @@
+"""
+Test python scripted platform in lldb
+"""
+
+import os, shutil
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+from lldbsuite.test import lldbtest
+
+
+class ScriptedPlatf
@@ -111,6 +111,7 @@ class SBStructuredData {
protected:
friend class SBAttachInfo;
friend class SBLaunchInfo;
+ friend class SBPlatform;
friend class SBDebugger;
friend class SBTarget;
friend class SBProcess;
clayborg wrote:
We keep friending new
@@ -6,20 +6,27 @@
class MyScriptedPlatform(ScriptedPlatform):
def __init__(self, exe_ctx, args):
-self.processes = {}
-
-proc = {}
-proc["name"] = "a.out"
-proc["arch"] = "arm64-apple-macosx"
-proc["pid"] = 420
-proc["parent"
clayborg wrote:
Was this why we saw some Swift progress dialogs hanging around forever?
Looks ok to me. @JDevlieghere feel free to add any more reviewers that have
been working on progress dialogs.
https://github.com/llvm/llvm-project/pull/102097
___
@@ -0,0 +1,58 @@
+// REQUIRES: system-linux, native
clayborg wrote:
I added a test with an on disk file
https://github.com/llvm/llvm-project/pull/101237
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https:/
https://github.com/clayborg edited
https://github.com/llvm/llvm-project/pull/102111
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -134,6 +134,20 @@ bool TypeQuery::ContextMatches(
if (ctx == ctx_end)
return false; // Pattern too long.
+if (ctx->kind == CompilerContextKind::Namespace && ctx->name.IsEmpty()) {
clayborg wrote:
Do we need to check for `"(anonymous namespace
@@ -440,12 +440,6 @@ static void GetTypeLookupContextImpl(DWARFDIE die,
continue;
}
-// If there is no name, then there is no need to look anything up for this
-// DIE.
-const char *name = die.GetName();
-if (!name || !name[0])
- return;
-
--
1201 - 1300 of 3323 matches
Mail list logo