Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lldb/tools/debugserver/source/MacOSX/MachProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ class MachProcess {

pid_t m_pid; // Process ID of child process
cpu_type_t m_cpu_type; // The CPU type of this process
uint32_t m_platform; // The platform of this process
std::optional<uint32_t> m_platform; // The platform of this process
int m_child_stdin;
int m_child_stdout;
int m_child_stderr;
Expand Down
8 changes: 4 additions & 4 deletions lldb/tools/debugserver/source/MacOSX/MachProcess.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1039,9 +1039,9 @@ static bool mach_header_validity_test(uint32_t magic, uint32_t cputype) {
};

uint32_t MachProcess::GetPlatform() {
if (m_platform == 0)
if (!m_platform)
m_platform = MachProcess::GetProcessPlatformViaDYLDSPI();
return m_platform;
return *m_platform;
}

uint32_t MachProcess::GetProcessPlatformViaDYLDSPI() {
Expand Down Expand Up @@ -1323,7 +1323,7 @@ static bool mach_header_validity_test(uint32_t magic, uint32_t cputype) {
// Clear any cached thread list while the pid and task are still valid

m_task.Clear();
m_platform = 0;
m_platform.reset();
// Now clear out all member variables
m_pid = INVALID_NUB_PROCESS;
if (!detaching)
Expand Down Expand Up @@ -1754,7 +1754,7 @@ static uint64_t bits(uint64_t value, uint32_t msbit, uint32_t lsbit) {

// NULL our task out as we have already restored all exception ports
m_task.Clear();
m_platform = 0;
m_platform.reset();

// Clear out any notion of the process we once were
const bool detaching = true;
Expand Down
Loading