Audacity 3.2.0
Namespaces | Functions
unix/CrashReportContext.cpp File Reference
#include "CrashReportContext.h"
#include <errno.h>
#include <map>
#include <sstream>
#include "client/linux/handler/exception_handler.h"
Include dependency graph for unix/CrashReportContext.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{CrashReportContext.cpp}
 

Functions

bool SendReport (CrashReportContext *c, const char *minidumpPath)
 
std::string anonymous_namespace{CrashReportContext.cpp}::StringifyParameters (const std::map< std::string, std::string > &parameters)
 
bool anonymous_namespace{CrashReportContext.cpp}::StrcpyChecked (char *dest, size_t destsz, const std::string &src)
 
bool anonymous_namespace{CrashReportContext.cpp}::DumpCallback (const google_breakpad::MinidumpDescriptor &descriptor, void *context, bool succeeded)
 

Function Documentation

◆ SendReport()

bool SendReport ( CrashReportContext c,
const char *  minidumpPath 
)

Audacity: A Digital Audio Editor

CrashReportContext.cpp

Vitaly Sverchinsky

Some parts of the code are designed to operate while app is crashing, so there may be some restrictions on heap usage. For more information please read Breakpad documentation.

Definition at line 26 of file unix/CrashReportContext.cpp.

27{
28 auto pid = fork();
29 if(pid == 0)
30 {
31 if(c->mParameters[0] != 0)
32 {
33 execl(c->mSenderPath, CRASHREPORTER_PROGRAM_NAME, "-a", c->mParameters, "-u", c->mReportURL, minidumpPath, NULL);
34 }
35 else
36 {
37 execl(c->mSenderPath, CRASHREPORTER_PROGRAM_NAME, "-u", c->mReportURL, minidumpPath, NULL);
38 }
39 fprintf(stderr, "Failed to start handler: %s\n", strerror(errno));
40 abort();
41 }
42 return pid != -1;
43}
char mParameters[MaxBufferLength]
char mSenderPath[MaxBufferLength]
char mReportURL[MaxBufferLength]

Referenced by anonymous_namespace{CrashReportContext.cpp}::DumpCallback().

Here is the caller graph for this function: