mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 06:40:01 +08:00
Create basic SBEnvironment class
Summary: Inspired by https://reviews.llvm.org/D74636, I'm introducing a basic version of Environment in the API. More functionalities can be added as needed. Reviewers: labath, clayborg Subscribers: mgorny, lldb-commits, diazhector98 Tags: #lldb Differential Revision: https://reviews.llvm.org/D76111
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "lldb/API/SBBreakpoint.h"
|
||||
#include "lldb/API/SBDebugger.h"
|
||||
#include "lldb/API/SBEnvironment.h"
|
||||
#include "lldb/API/SBEvent.h"
|
||||
#include "lldb/API/SBExpressionOptions.h"
|
||||
#include "lldb/API/SBFileSpec.h"
|
||||
@@ -2388,6 +2389,17 @@ void SBTarget::SetLaunchInfo(const lldb::SBLaunchInfo &launch_info) {
|
||||
m_opaque_sp->SetProcessLaunchInfo(launch_info.ref());
|
||||
}
|
||||
|
||||
SBEnvironment SBTarget::GetEnvironment() {
|
||||
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBEnvironment, SBTarget, GetEnvironment);
|
||||
TargetSP target_sp(GetSP());
|
||||
|
||||
if (target_sp) {
|
||||
return LLDB_RECORD_RESULT(SBEnvironment(target_sp->GetEnvironment()));
|
||||
}
|
||||
|
||||
return LLDB_RECORD_RESULT(SBEnvironment());
|
||||
}
|
||||
|
||||
namespace lldb_private {
|
||||
namespace repro {
|
||||
|
||||
@@ -2643,6 +2655,7 @@ void RegisterMethods<SBTarget>(Registry &R) {
|
||||
LLDB_REGISTER_METHOD(lldb::SBInstructionList, SBTarget,
|
||||
GetInstructionsWithFlavor,
|
||||
(lldb::addr_t, const char *, const void *, size_t));
|
||||
LLDB_REGISTER_METHOD(lldb::SBEnvironment, SBTarget, GetEnvironment, ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user