mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-04 09:44:16 +00:00
[common] implemented crash handler for linux (including backtrace)
This commit is contained in:
@@ -33,8 +33,9 @@ add_compile_options(
|
||||
"-ffunction-sections"
|
||||
"$<$<CONFIG:DEBUG>:-O0;-g3;-ggdb>"
|
||||
)
|
||||
set(CMAKE_EXE_LINKER FLAGS "-Wl,--gc-sections")
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
|
||||
set(EXE_FLAGS "-Wl,--gc-sections")
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PKGCONFIG REQUIRED
|
||||
@@ -67,7 +68,8 @@ include_directories(
|
||||
link_libraries(
|
||||
${PKGCONFIG_LIBRARIES}
|
||||
${GMP_LIBRARIES}
|
||||
rt m
|
||||
rt
|
||||
m
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
@@ -89,6 +91,7 @@ add_subdirectory(decoders)
|
||||
add_executable(looking-glass-client ${SOURCES})
|
||||
target_compile_options(looking-glass-client PUBLIC ${PKGCONFIG_CFLAGS_OTHER})
|
||||
target_link_libraries(looking-glass-client
|
||||
${EXE_FLAGS}
|
||||
lg_common
|
||||
spice
|
||||
renderers
|
||||
|
@@ -36,6 +36,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include <assert.h>
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "common/crash.h"
|
||||
#include "common/KVMFR.h"
|
||||
#include "utils.h"
|
||||
#include "kb.h"
|
||||
@@ -1295,6 +1296,9 @@ int run()
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
if (!installCrashHandler(argv[0]))
|
||||
DEBUG_WARN("Failed to install the crash handler");
|
||||
|
||||
if (!config_load(argc, argv))
|
||||
return -1;
|
||||
|
||||
|
Reference in New Issue
Block a user