Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
b0b13fa8
Commit
b0b13fa8
authored
Dec 15, 2009
by
Hugo Beauzee-Luyssen
Browse files
CrashHandler is now functionnal under Win32
parent
e63aaf3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/GUI/widgets/CrashHandler.cpp
View file @
b0b13fa8
...
...
@@ -21,26 +21,33 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "CrashHandler.h"
#include "ui_CrashHandler.h"
#ifndef WIN32
#include <execinfo.h>
#endif
#include <execinfo.h>
#include <signal.h>
#include "CrashHandler.h"
#include "ui_CrashHandler.h"
CrashHandler
::
CrashHandler
(
int
sig
,
QWidget
*
parent
)
:
QDialog
(
parent
),
ui
(
new
Ui
::
CrashHandler
)
{
ui
->
setupUi
(
this
);
#ifndef WIN32
void
*
buff
[
CrashHandler
::
backtraceSize
];
int
nbSymb
=
backtrace
(
buff
,
CrashHandler
::
backtraceSize
);
char
**
backtraceStr
=
backtrace_symbols
(
buff
,
nbSymb
);
for
(
int
i
=
0
;
i
<
nbSymb
;
++
i
)
ui
->
backtraceDisplay
->
insertPlainText
(
QString
(
backtraceStr
[
i
])
+
"
\n
"
);
free
(
backtraceStr
);
#else
ui
->
backtraceDisplay
->
insertPlainText
(
tr
(
"Unable to get backtrace."
)
);
#endif
QString
sigName
=
tr
(
"Unknown signal"
);
if
(
sig
==
SIGSEGV
)
sigName
=
"SIGSEGV (Segmentation Fault)"
;
...
...
src/Project/ProjectManager.cpp
View file @
b0b13fa8
...
...
@@ -59,6 +59,8 @@ ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
// signal( SIGSEGV, ProjectManager::signalHandler );
// signal( SIGINT, SIG_IGN );
signal
(
SIGFPE
,
ProjectManager
::
signalHandler
);
signal
(
SIGABRT
,
ProjectManager
::
signalHandler
);
signal
(
SIGILL
,
ProjectManager
::
signalHandler
);
}
ProjectManager
::~
ProjectManager
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment