Author: Jonas Devlieghere Date: 2020-01-28T16:44:58-08:00 New Revision: 1dfe7b5be63e9d80e2704255dbeb6813cc7f6e57
URL: https://github.com/llvm/llvm-project/commit/1dfe7b5be63e9d80e2704255dbeb6813cc7f6e57 DIFF: https://github.com/llvm/llvm-project/commit/1dfe7b5be63e9d80e2704255dbeb6813cc7f6e57.diff LOG: [lldb/API] Implement the copy (assignment) constructor for SBLaunchInfo Currently the constructor is compiler generated which means it doesn't get instrumented for the reproducers. Added: Modified: lldb/include/lldb/API/SBLaunchInfo.h lldb/source/API/SBLaunchInfo.cpp Removed: ################################################################################ diff --git a/lldb/include/lldb/API/SBLaunchInfo.h b/lldb/include/lldb/API/SBLaunchInfo.h index c7b381ffdf97..eef6bc78e5f2 100644 --- a/lldb/include/lldb/API/SBLaunchInfo.h +++ b/lldb/include/lldb/API/SBLaunchInfo.h @@ -26,6 +26,10 @@ class LLDB_API SBLaunchInfo { ~SBLaunchInfo(); + SBLaunchInfo(const SBLaunchInfo &rhs); + + void operator=(const SBLaunchInfo &rhs); + lldb::pid_t GetProcessID(); uint32_t GetUserID(); diff --git a/lldb/source/API/SBLaunchInfo.cpp b/lldb/source/API/SBLaunchInfo.cpp index e98e648edc3d..9e7159995cc4 100644 --- a/lldb/source/API/SBLaunchInfo.cpp +++ b/lldb/source/API/SBLaunchInfo.cpp @@ -43,6 +43,19 @@ SBLaunchInfo::SBLaunchInfo(const char **argv) m_opaque_sp->GetArguments().SetArguments(argv); } +SBLaunchInfo::SBLaunchInfo(const SBLaunchInfo &rhs) { + LLDB_RECORD_CONSTRUCTOR(SBLaunchInfo, (const lldb::SBLaunchInfo &), rhs); + + m_opaque_sp = rhs.m_opaque_sp; +} + +void SBLaunchInfo::operator=(const SBLaunchInfo &rhs) { + LLDB_RECORD_METHOD(void, SBLaunchInfo, operator=,(const lldb::SBLaunchInfo &), + rhs); + + m_opaque_sp = rhs.m_opaque_sp; +} + SBLaunchInfo::~SBLaunchInfo() {} const lldb_private::ProcessLaunchInfo &SBLaunchInfo::ref() const { @@ -322,6 +335,9 @@ namespace repro { template <> void RegisterMethods<SBLaunchInfo>(Registry &R) { LLDB_REGISTER_CONSTRUCTOR(SBLaunchInfo, (const char **)); + LLDB_REGISTER_CONSTRUCTOR(SBLaunchInfo, (const lldb::SBLaunchInfo &)); + LLDB_REGISTER_METHOD(void, + SBLaunchInfo, operator=,(const lldb::SBLaunchInfo &)); LLDB_REGISTER_METHOD(lldb::pid_t, SBLaunchInfo, GetProcessID, ()); LLDB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetUserID, ()); LLDB_REGISTER_METHOD(uint32_t, SBLaunchInfo, GetGroupID, ()); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits