#include <Tracer.hpp>
Public Member Functions | |
Tracer (std::shared_ptr< std::atomic_flag > checkFlag, std::string serverPath="", std::string serverProxy="", const std::string &crashpadHandlerPath="", const std::string &reportPath="", std::vector< base::FilePath > attachments={}) | |
Tracer (const Tracer &)=delete | |
Copy constructor. | |
Tracer (Tracer &&)=delete | |
Move constructor. | |
Tracer & | operator= (Tracer)=delete |
Copy assignment operator. | |
Tracer & | operator= (Tracer &&)=delete |
Move assignment operator. | |
~Tracer () | |
void | restart () |
Static Public Member Functions | |
static bool | isRunning () |
Private Member Functions | |
void | startHandler () |
void | threadFunc () noexcept |
Static Private Member Functions | |
static bool | checkPidIsRunning (pid_t processId) |
static bool | checkSocketIsRunning (int sockId) |
static std::string | getSelfExecutableDir () |
static void | dumpSharedLibraryInfo (const std::string &filePath) |
Private Attributes | |
std::unique_ptr< std::thread > | _thread |
std::atomic_flag | _shouldStop {false} |
std::shared_ptr< std::atomic_flag > | _checkFlag |
std::string | _serverPath |
std::string | _serverProxy |
std::string | _handlerPath |
std::map< std::string, std::string > | _annotations |
std::vector< base::FilePath > | _attachments |
std::string | _reportPath |
std::unique_ptr< crashpad::CrashpadClient > | _clientHandler |
Tracer class to handle operations of Crashpad
Definition at line 10 of file Tracer.hpp.
|
explicit |
Construct a new Tracer object
[in] | checkFlag | Flag to check if the process is running |
[in] | serverPath | Remote server address |
[in] | serverProxy | Remote server proxy |
[in] | reportPath | Path to where dump minidump files |
[in] | crashpadHandlerPath | Path to crashpad_handler executable |
[in] | attachments | Attachments to add to the minidump |
Definition at line 173 of file Tracer.cpp.
|
delete |
Copy constructor.
|
delete |
Move constructor.
Tracer::~Tracer | ( | ) |
Destroy the Tracer object
Definition at line 198 of file Tracer.cpp.
|
staticprivate |
Check if the given process ID is running
[in] | processId | The process ID to check |
Definition at line 82 of file Tracer.cpp.
|
staticprivate |
Check if the given socket ID is running
[in] | sockId | The socket ID to check |
Definition at line 84 of file Tracer.cpp.
|
staticprivate |
Dump shared library information to a file
[in] | filePath | File path to dump the information |
Definition at line 133 of file Tracer.cpp.
|
inlinestaticprivate |
Get the executable directory of the current application
Definition at line 94 of file Tracer.cpp.
|
staticnodiscard |
Check if the crashpad_handler process is running
Definition at line 104 of file Tracer.cpp.
void Tracer::restart | ( | ) |
Check and restart the crashpad_handler process if it is not running
Definition at line 125 of file Tracer.cpp.
|
private |
Start the crashpad handler process
Definition at line 22 of file Tracer.cpp.
|
privatenoexcept |
Thread function to check and restart the crashpad handler process
Definition at line 56 of file Tracer.cpp.
|
private |
Definition at line 19 of file Tracer.hpp.
|
private |
Definition at line 20 of file Tracer.hpp.
|
private |
Definition at line 14 of file Tracer.hpp.
|
private |
Definition at line 22 of file Tracer.hpp.
|
private |
Definition at line 18 of file Tracer.hpp.
|
private |
Definition at line 21 of file Tracer.hpp.
|
private |
Definition at line 16 of file Tracer.hpp.
|
private |
Definition at line 17 of file Tracer.hpp.
|
private |
Definition at line 13 of file Tracer.hpp.
|
private |
Definition at line 12 of file Tracer.hpp.