Some Questions About Breakpad in Linux

79 views
Skip to first unread message

邹仁

unread,
Jan 13, 2022, 3:23:49 AM1/13/22
to Google Breakpad Discuss
Dear Google developer team:

Hello, When I use this project in my personal exercises, I had some problem and i can't
to solve it.

This is the message about my computer environment

        My Operating System is Ubnutu20.04
        My Gcc version is gcc-7.50


The source code is:


#include "breakpad/client/linux/handler/exception_handler.h"
#include <iostream>
#include <thread>

static bool callBack(const google_breakpad::MinidumpDescriptor &descriptor,
              void* context,
              bool succeed){
    printf("I am the callback handle\n");
    printf("Dump File Path: %s\n", descriptor.path());
    return succeed;
}

void crashHere1(){
    int *a = new int ;
    crashHere1();
}

int main(int argc, char *argv[]) {

    google_breakpad::MinidumpDescriptor descriptor("/tmp");
    google_breakpad::ExceptionHandler eh(descriptor,
                                      NULL,
                                      callBack,
                                      NULL,
                                      true,
                                      -1);
    std::thread t(craseHere1);
    t.join();

    return 0;
}



And when i run this code, I found it can't produce the minidump, and it seems to not call
the callback function that passed by me,

Reply all
Reply to author
Forward
0 new messages