summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index ee0897e5950..56d258187ea 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -126,7 +126,7 @@ bool SBTarget::EventIsTargetEvent(const SBEvent &event) {
LLDB_RECORD_STATIC_METHOD(bool, SBTarget, EventIsTargetEvent,
(const lldb::SBEvent &), event);
- return Target::TargetEventData::GetEventDataFromEvent(event.get()) != NULL;
+ return Target::TargetEventData::GetEventDataFromEvent(event.get()) != nullptr;
}
SBTarget SBTarget::GetTargetFromEvent(const SBEvent &event) {
@@ -171,7 +171,7 @@ bool SBTarget::IsValid() const {
SBTarget::operator bool() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBTarget, operator bool);
- return m_opaque_sp.get() != NULL && m_opaque_sp->IsValid();
+ return m_opaque_sp.get() != nullptr && m_opaque_sp->IsValid();
}
SBProcess SBTarget::GetProcess() {
@@ -288,9 +288,9 @@ SBProcess SBTarget::LaunchSimple(char const **argv, char const **envp,
(const char **, const char **, const char *), argv, envp,
working_directory);
- char *stdin_path = NULL;
- char *stdout_path = NULL;
- char *stderr_path = NULL;
+ char *stdin_path = nullptr;
+ char *stdout_path = nullptr;
+ char *stderr_path = nullptr;
uint32_t launch_flags = 0;
bool stop_at_entry = false;
SBError error;
@@ -307,7 +307,7 @@ SBError SBTarget::Install() {
TargetSP target_sp(GetSP());
if (target_sp) {
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
- sb_error.ref() = target_sp->Install(NULL);
+ sb_error.ref() = target_sp->Install(nullptr);
}
return LLDB_RECORD_RESULT(sb_error);
}
@@ -381,7 +381,7 @@ SBProcess SBTarget::Launch(SBListener &listener, char const **argv,
if (listener.IsValid())
launch_info.SetListener(listener.GetSP());
- error.SetError(target_sp->Launch(launch_info, NULL));
+ error.SetError(target_sp->Launch(launch_info, nullptr));
sb_process.SetSP(target_sp->GetProcessSP());
} else {
@@ -430,7 +430,7 @@ SBProcess SBTarget::Launch(SBLaunchInfo &sb_launch_info, SBError &error) {
if (arch_spec.IsValid())
launch_info.GetArchitecture() = arch_spec;
- error.SetError(target_sp->Launch(launch_info, NULL));
+ error.SetError(target_sp->Launch(launch_info, nullptr));
sb_launch_info.set_ref(launch_info);
sb_process.SetSP(target_sp->GetProcessSP());
} else {
@@ -551,14 +551,14 @@ lldb::SBProcess SBTarget::ConnectRemote(SBListener &listener, const char *url,
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
if (listener.IsValid())
process_sp =
- target_sp->CreateProcess(listener.m_opaque_sp, plugin_name, NULL);
+ target_sp->CreateProcess(listener.m_opaque_sp, plugin_name, nullptr);
else
process_sp = target_sp->CreateProcess(
- target_sp->GetDebugger().GetListener(), plugin_name, NULL);
+ target_sp->GetDebugger().GetListener(), plugin_name, nullptr);
if (process_sp) {
sb_process.SetSP(process_sp);
- error.SetError(process_sp->ConnectRemote(NULL, url));
+ error.SetError(process_sp->ConnectRemote(nullptr, url));
} else {
error.SetErrorString("unable to create lldb_private::Process");
}
@@ -788,12 +788,12 @@ SBBreakpoint SBTarget::BreakpointCreateByName(const char *symbol_name,
FileSpecList module_spec_list;
module_spec_list.Append(FileSpec(module_name));
sb_bp = target_sp->CreateBreakpoint(
- &module_spec_list, NULL, symbol_name, eFunctionNameTypeAuto,
+ &module_spec_list, nullptr, symbol_name, eFunctionNameTypeAuto,
eLanguageTypeUnknown, offset, skip_prologue, internal, hardware);
} else {
sb_bp = target_sp->CreateBreakpoint(
- NULL, NULL, symbol_name, eFunctionNameTypeAuto, eLanguageTypeUnknown,
- offset, skip_prologue, internal, hardware);
+ nullptr, nullptr, symbol_name, eFunctionNameTypeAuto,
+ eLanguageTypeUnknown, offset, skip_prologue, internal, hardware);
}
}
@@ -1425,7 +1425,7 @@ lldb::SBWatchpoint SBTarget::WatchAddress(lldb::addr_t addr, size_t size,
// Target::CreateWatchpoint() is thread safe.
Status cw_error;
// This API doesn't take in a type, so we can't figure out what it is.
- CompilerType *type = NULL;
+ CompilerType *type = nullptr;
watchpoint_sp =
target_sp->CreateWatchpoint(addr, size, type, watch_type, cw_error);
error.SetError(cw_error);
@@ -1559,7 +1559,7 @@ lldb::SBModule SBTarget::AddModule(const char *path, const char *triple,
(const char *, const char *, const char *), path, triple,
uuid_cstr);
- return LLDB_RECORD_RESULT(AddModule(path, triple, uuid_cstr, NULL));
+ return LLDB_RECORD_RESULT(AddModule(path, triple, uuid_cstr, nullptr));
}
lldb::SBModule SBTarget::AddModule(const char *path, const char *triple,
@@ -1683,7 +1683,7 @@ const char *SBTarget::GetTriple() {
ConstString const_triple(triple.c_str());
return const_triple.GetCString();
}
- return NULL;
+ return nullptr;
}
uint32_t SBTarget::GetDataByteSize() {
@@ -1969,7 +1969,7 @@ SBValueList SBTarget::FindGlobalVariables(const char *name,
if (match_count > 0) {
ExecutionContextScope *exe_scope = target_sp->GetProcessSP().get();
- if (exe_scope == NULL)
+ if (exe_scope == nullptr)
exe_scope = target_sp.get();
for (uint32_t i = 0; i < match_count; ++i) {
lldb::ValueObjectSP valobj_sp(ValueObjectVariable::Create(
@@ -2017,7 +2017,7 @@ SBValueList SBTarget::FindGlobalVariables(const char *name,
if (match_count > 0) {
ExecutionContextScope *exe_scope = target_sp->GetProcessSP().get();
- if (exe_scope == NULL)
+ if (exe_scope == nullptr)
exe_scope = target_sp.get();
for (uint32_t i = 0; i < match_count; ++i) {
lldb::ValueObjectSP valobj_sp(ValueObjectVariable::Create(
@@ -2053,7 +2053,7 @@ lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress base_addr,
LLDB_RECORD_METHOD(lldb::SBInstructionList, SBTarget, ReadInstructions,
(lldb::SBAddress, uint32_t), base_addr, count);
- return LLDB_RECORD_RESULT(ReadInstructions(base_addr, count, NULL));
+ return LLDB_RECORD_RESULT(ReadInstructions(base_addr, count, nullptr));
}
lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress base_addr,
@@ -2080,7 +2080,7 @@ lldb::SBInstructionList SBTarget::ReadInstructions(lldb::SBAddress base_addr,
data.GetByteSize(), error, &load_addr);
const bool data_from_file = load_addr == LLDB_INVALID_ADDRESS;
sb_instructions.SetDisassembler(Disassembler::DisassembleBytes(
- target_sp->GetArchitecture(), NULL, flavor_string, *addr_ptr,
+ target_sp->GetArchitecture(), nullptr, flavor_string, *addr_ptr,
data.GetBytes(), bytes_read, count, data_from_file));
}
}
@@ -2095,7 +2095,7 @@ lldb::SBInstructionList SBTarget::GetInstructions(lldb::SBAddress base_addr,
(lldb::SBAddress, const void *, size_t), base_addr, buf,
size);
- return GetInstructionsWithFlavor(base_addr, NULL, buf, size);
+ return GetInstructionsWithFlavor(base_addr, nullptr, buf, size);
}
lldb::SBInstructionList
@@ -2119,7 +2119,7 @@ SBTarget::GetInstructionsWithFlavor(lldb::SBAddress base_addr,
const bool data_from_file = true;
sb_instructions.SetDisassembler(Disassembler::DisassembleBytes(
- target_sp->GetArchitecture(), NULL, flavor_string, addr, buf, size,
+ target_sp->GetArchitecture(), nullptr, flavor_string, addr, buf, size,
UINT32_MAX, data_from_file));
}
@@ -2132,7 +2132,7 @@ lldb::SBInstructionList SBTarget::GetInstructions(lldb::addr_t base_addr,
LLDB_RECORD_DUMMY(lldb::SBInstructionList, SBTarget, GetInstructions,
(lldb::addr_t, const void *, size_t), base_addr, buf, size);
- return GetInstructionsWithFlavor(ResolveLoadAddress(base_addr), NULL, buf,
+ return GetInstructionsWithFlavor(ResolveLoadAddress(base_addr), nullptr, buf,
size);
}
@@ -2353,9 +2353,9 @@ lldb::SBValue SBTarget::EvaluateExpression(const char *expr,
SBValue expr_result;
ValueObjectSP expr_value_sp;
TargetSP target_sp(GetSP());
- StackFrame *frame = NULL;
+ StackFrame *frame = nullptr;
if (target_sp) {
- if (expr == NULL || expr[0] == '\0') {
+ if (expr == nullptr || expr[0] == '\0') {
return LLDB_RECORD_RESULT(expr_result);
}
@@ -2409,7 +2409,7 @@ lldb::addr_t SBTarget::GetStackRedZoneSize() {
lldb::SBLaunchInfo SBTarget::GetLaunchInfo() const {
LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBLaunchInfo, SBTarget, GetLaunchInfo);
- lldb::SBLaunchInfo launch_info(NULL);
+ lldb::SBLaunchInfo launch_info(nullptr);
TargetSP target_sp(GetSP());
if (target_sp)
launch_info.set_ref(m_opaque_sp->GetProcessLaunchInfo());
OpenPOWER on IntegriCloud