forked from OSchip/llvm-project
[debugserver] Use class member initialization for RNBContext
Address Shafik Yaghmour's post commit code review feedback.
This commit is contained in:
parent
6bdaf5e341
commit
ae8a5c6852
|
@ -43,12 +43,7 @@ public:
|
|||
all_event_bits = sticky_event_bits | normal_event_bits
|
||||
} event_t;
|
||||
// Constructors and Destructors
|
||||
RNBContext()
|
||||
: m_pid(INVALID_NUB_PROCESS), m_pid_stop_count(0),
|
||||
m_events(0, all_event_bits), m_pid_pthread(), m_launch_status(),
|
||||
m_arg_vec(), m_env_vec(), m_detach_on_error(false),
|
||||
m_unmask_signals(false) {}
|
||||
|
||||
RNBContext() = default;
|
||||
virtual ~RNBContext();
|
||||
|
||||
nub_process_t ProcessID() const { return m_pid; }
|
||||
|
@ -132,24 +127,26 @@ public:
|
|||
|
||||
protected:
|
||||
// Classes that inherit from RNBContext can see and modify these
|
||||
nub_process_t m_pid;
|
||||
nub_process_t m_pid = INVALID_NUB_PROCESS;
|
||||
std::string m_stdin;
|
||||
std::string m_stdout;
|
||||
std::string m_stderr;
|
||||
std::string m_working_dir;
|
||||
nub_size_t m_pid_stop_count;
|
||||
PThreadEvent m_events; // Threaded events that we can wait for
|
||||
nub_size_t m_pid_stop_count = 0;
|
||||
/// Threaded events that we can wait for.
|
||||
PThreadEvent m_events{0, all_event_bits};
|
||||
pthread_t m_pid_pthread;
|
||||
nub_launch_flavor_t m_launch_flavor; // How to launch our inferior process
|
||||
DNBError
|
||||
m_launch_status; // This holds the status from the last launch attempt.
|
||||
/// How to launch our inferior process.
|
||||
nub_launch_flavor_t m_launch_flavor = eLaunchFlavorDefault;
|
||||
/// This holds the status from the last launch attempt.
|
||||
DNBError m_launch_status;
|
||||
std::vector<std::string> m_arg_vec;
|
||||
std::vector<std::string>
|
||||
m_env_vec; // This will be unparsed - entries FOO=value
|
||||
/// This will be unparsed entries FOO=value
|
||||
std::vector<std::string> m_env_vec;
|
||||
std::string m_working_directory;
|
||||
std::string m_process_event;
|
||||
bool m_detach_on_error;
|
||||
bool m_unmask_signals;
|
||||
bool m_detach_on_error = false;
|
||||
bool m_unmask_signals = false;
|
||||
|
||||
void StartProcessStatusThread();
|
||||
void StopProcessStatusThread();
|
||||
|
|
Loading…
Reference in New Issue