[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Jason Molenda via lldb-commits
@@ -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; + } +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Jason Molenda via lldb-commits
jasonmolenda wrote: Stepping back a bit, do we gain anything in `SaveCoreOptions` by having `m_process_sp` be optional? Is there a distinction between an empty ProcessSP and no ProcessSP object? https://github.com/llvm/llvm-project/pull/100443 ___ l

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
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

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via 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

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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:

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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(); -

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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; + } +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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; + } +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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; + } +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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; + } +

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] [LLDB][SBSaveCore] Implement a selectable threadlist for Core Options. (PR #100443)

2024-07-24 Thread Greg Clayton via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-07-24 Thread Med Ismail Bennani via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-07-24 Thread Med Ismail Bennani via lldb-commits
@@ -180,7 +184,19 @@ class CommandObjectPlatformSelect : public CommandObjectParsed { m_interpreter, ArchSpec(), select, error, platform_arch)); if (platform_sp) { GetDebugger().GetPlatformList().SetSelectedPlatform(platform_sp); - + Opti

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-07-24 Thread Med Ismail Bennani via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-07-24 Thread Med Ismail Bennani via lldb-commits
@@ -0,0 +1,305 @@ +//===-- ScriptedPlatform.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

[Lldb-commits] [lldb] [lldb/Plugins] Introduce Scripted Platform Plugin (PR #99814)

2024-07-24 Thread Med Ismail Bennani via lldb-commits
@@ -1003,6 +1010,21 @@ class Platform : public PluginInterface { FileSpec GetModuleCacheRoot(); }; +class PlatformMetadata { +public: + PlatformMetadata(Debugger &debugger, const ScriptedMetadata metadata); + ~PlatformMetadata() = default; + + Debugger &GetDebugger() cons

[Lldb-commits] [lldb] [lldb-dap] Updated README.md for newly added attach properties. (PR #99926)

2024-07-24 Thread Santhosh Kumar Ellendula via lldb-commits
https://github.com/santhoshe447 updated https://github.com/llvm/llvm-project/pull/99926 >From 960351c9abf51f42d92604ac6297aa5b76ddfba5 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Ellendula Date: Fri, 17 Nov 2023 15:09:10 +0530 Subject: [PATCH 01/19] [lldb][test] Add the ability to extract the

[Lldb-commits] [lldb] [lldb-dap] Updated README.md for newly added attach properties. (PR #99926)

2024-07-24 Thread Santhosh Kumar Ellendula via lldb-commits
https://github.com/santhoshe447 updated https://github.com/llvm/llvm-project/pull/99926 >From 960351c9abf51f42d92604ac6297aa5b76ddfba5 Mon Sep 17 00:00:00 2001 From: Santhosh Kumar Ellendula Date: Fri, 17 Nov 2023 15:09:10 +0530 Subject: [PATCH 01/20] [lldb][test] Add the ability to extract the

[Lldb-commits] [lldb] [lldb-dap] Updated README.md for newly added attach properties. (PR #99926)

2024-07-24 Thread Santhosh Kumar Ellendula via lldb-commits
https://github.com/santhoshe447 edited https://github.com/llvm/llvm-project/pull/99926 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Updated README.md for newly added attach properties. (PR #99926)

2024-07-24 Thread Santhosh Kumar Ellendula via lldb-commits
https://github.com/santhoshe447 edited https://github.com/llvm/llvm-project/pull/99926 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

<    1   2