LLDB mainline
SBProcessInfoList.cpp
Go to the documentation of this file.
1//===-- SBProcessInfoList.cpp ---------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
13
14#include "Utils.h"
15
16using namespace lldb;
17using namespace lldb_private;
18
20
22
24 : m_opaque_up(std::make_unique<ProcessInfoList>(impl)) {
25 LLDB_INSTRUMENT_VA(this, impl);
26}
27
29
30 LLDB_INSTRUMENT_VA(this, rhs);
31
33}
34
37
38 LLDB_INSTRUMENT_VA(this, rhs);
39
40 if (this != &rhs)
42 return *this;
43}
44
47
48 if (m_opaque_up)
49 return m_opaque_up->GetSize();
50
51 return 0;
52}
53
56
57 if (m_opaque_up)
58 m_opaque_up->Clear();
59}
60
62 SBProcessInfo &info) {
63 LLDB_INSTRUMENT_VA(this, idx, info);
64
65 if (m_opaque_up) {
66 lldb_private::ProcessInstanceInfo process_instance_info;
67 if (m_opaque_up->GetProcessInfoAtIndex(idx, process_instance_info)) {
68 info.SetProcessInfo(process_instance_info);
69 return true;
70 }
71 }
72
73 return false;
74}
#define LLDB_INSTRUMENT_VA(...)
const lldb::SBProcessInfoList & operator=(const lldb::SBProcessInfoList &rhs)
std::unique_ptr< lldb_private::ProcessInfoList > m_opaque_up
bool GetProcessInfoAtIndex(uint32_t idx, SBProcessInfo &info)
void SetProcessInfo(const lldb_private::ProcessInstanceInfo &proc_info_ref)
A class that represents a running process on the host machine.
std::unique_ptr< T > clone(const std::unique_ptr< T > &src)
Definition: Utils.h:17
Definition: SBAddress.h:15