Skip to content

Commit f3c84f9

Browse files
author
ThePBone
committed
Fix addr2line compatibility
1 parent cd37c8f commit f3c84f9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

main.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ void crash_handled(int fd){
2828
using namespace std;
2929
int main(int argc, char *argv[])
3030
{
31+
findyourself_init(argv[0]);
32+
char exepath[PATH_MAX];
33+
find_yourself(exepath, sizeof(exepath));
34+
3135
#ifdef ENABLE_CRASH_HANDLER
32-
EXECUTION_FILENAME = argv[0];
36+
EXECUTION_FILENAME = exepath;
3337
mkdir("/tmp/viper-gui/", S_IRWXU);
3438
int fd = safe_open_wo_fd("/tmp/viper-gui/crash.dmp");
3539
airbag_init_fd(fd,crash_handled,EXECUTION_FILENAME);
3640
#endif
3741

38-
findyourself_init(argv[0]);
39-
char exepath[PATH_MAX];
40-
find_yourself(exepath, sizeof(exepath));
4142

4243
QApplication a(argc, argv);
4344
QCommandLineParser parser;

0 commit comments

Comments
 (0)