mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
Create basic SBEnvironment class
This commit is contained in:
@@ -8,9 +8,11 @@
|
||||
|
||||
#include "lldb/API/SBPlatform.h"
|
||||
#include "SBReproducerPrivate.h"
|
||||
#include "lldb/API/SBEnvironment.h"
|
||||
#include "lldb/API/SBError.h"
|
||||
#include "lldb/API/SBFileSpec.h"
|
||||
#include "lldb/API/SBLaunchInfo.h"
|
||||
#include "lldb/API/SBPlatform.h"
|
||||
#include "lldb/API/SBUnixSignals.h"
|
||||
#include "lldb/Host/File.h"
|
||||
#include "lldb/Target/Platform.h"
|
||||
@@ -649,6 +651,17 @@ SBUnixSignals SBPlatform::GetUnixSignals() const {
|
||||
return LLDB_RECORD_RESULT(SBUnixSignals());
|
||||
}
|
||||
|
||||
SBEnvironment SBPlatform::GetEnvironment() {
|
||||
LLDB_RECORD_METHOD_NO_ARGS(lldb::SBEnvironment, SBPlatform, GetEnvironment);
|
||||
PlatformSP platform_sp(GetSP());
|
||||
|
||||
if (platform_sp) {
|
||||
return LLDB_RECORD_RESULT(SBEnvironment(platform_sp->GetEnvironment()));
|
||||
}
|
||||
|
||||
return LLDB_RECORD_RESULT(SBEnvironment());
|
||||
}
|
||||
|
||||
namespace lldb_private {
|
||||
namespace repro {
|
||||
|
||||
@@ -740,6 +753,7 @@ void RegisterMethods<SBPlatform>(Registry &R) {
|
||||
(const char *));
|
||||
LLDB_REGISTER_METHOD(lldb::SBError, SBPlatform, SetFilePermissions,
|
||||
(const char *, uint32_t));
|
||||
LLDB_REGISTER_METHOD(lldb::SBEnvironment, SBPlatform, GetEnvironment, ());
|
||||
LLDB_REGISTER_METHOD_CONST(lldb::SBUnixSignals, SBPlatform, GetUnixSignals,
|
||||
());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user