diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2013-08-17 19:49:43 -0500 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2013-08-17 19:49:43 -0500 |
commit | 8825cf6535b4e3a920db1cc4a0e0228b4535bebf (patch) | |
tree | dce44a1429ee0c7b24dca37291deadd06768cd91 | |
parent | 52b8aef9ccb7a752ee1d9d4ab83da20347b09322 (diff) | |
parent | 35748811a4b11b5947879f657a752e89d649ce06 (diff) | |
download | tdelibs-8825cf6535b4e3a920db1cc4a0e0228b4535bebf.tar.gz tdelibs-8825cf6535b4e3a920db1cc4a0e0228b4535bebf.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdelibs
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | config.h.cmake | 3 | ||||
-rw-r--r-- | tdeio/tdeio/CMakeLists.txt | 9 | ||||
-rw-r--r-- | tdeio/tdeio/slavebase.cpp | 10 |
4 files changed, 15 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0eaf6a052..4e84a52ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,6 +203,7 @@ check_include_file( "termio.h" HAVE_TERMIO_H ) check_include_file( "unistd.h" HAVE_UNISTD_H ) check_include_file( "util.h" HAVE_UTIL_H ) check_include_file( "values.h" HAVE_VALUES_H ) +check_include_file( "demangle.h" HAVE_DEMANGLE_H ) # FIXME I'm not sure if test TIME_WITH_SYS_TIME are correct check_include_file( "sys/time.h" HAVE_SYS_TIME_H ) diff --git a/config.h.cmake b/config.h.cmake index f420d042f..9d1ffa0c7 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -653,6 +653,9 @@ /* Define to 1 if you have the <values.h> header file. */ #cmakedefine HAVE_VALUES_H 1 +/* Define to 1 if you have the <demangle.h> header file from binutils package. */ +#cmakedefine HAVE_DEMANGLE_H 1 + /* Define, to enable volume management (Solaris 2.x), if you have -lvolmgt */ #undef HAVE_VOLMGT diff --git a/tdeio/tdeio/CMakeLists.txt b/tdeio/tdeio/CMakeLists.txt index c1287dc82..cf5c272a9 100644 --- a/tdeio/tdeio/CMakeLists.txt +++ b/tdeio/tdeio/CMakeLists.txt @@ -81,13 +81,18 @@ set( ${target}_SRCS kdirnotify.cpp kdirnotify.skel kdirnotify_stub.cpp observer.cpp ../misc/uiserver.stub observer.skel tdeemailsettings.cpp kprotocolinfo.cpp renamedlg.cpp skipdlg.cpp kremoteencoding.cpp - kmimetypechooser.cpp backtrace_symbols.c + kmimetypechooser.cpp ) +if( HAVE_BACKTRACE AND HAVE_DEMANGLE_H ) + list( APPEND ${target}_SRCS backtrace_symbols.c ) + set( BACKTRACE_LIBRARY bfd ) +endif( ) + tde_add_library( ${target} STATIC_PIC AUTOMOC SOURCES ${${target}_SRCS} DEPENDENCIES dcopidl - LINK bfd + LINK ${BACKTRACE_LIBRARY} ) diff --git a/tdeio/tdeio/slavebase.cpp b/tdeio/tdeio/slavebase.cpp index d4aa8ca26..83b2a9889 100644 --- a/tdeio/tdeio/slavebase.cpp +++ b/tdeio/tdeio/slavebase.cpp @@ -66,10 +66,10 @@ #endif #endif -#ifndef NDEBUG -#ifdef HAVE_BACKTRACE +#ifndef NDEBUG void print_trace() { +#if defined(HAVE_BACKTRACE) && defined(HAVE_DEMANGLE_H) void *array[10]; size_t size; char **strings; @@ -85,9 +85,9 @@ void print_trace() } free (strings); +#endif // defined(HAVE_BACKTRACE) && defined(HAVE_DEMANGLE_H) } -#endif -#endif +#endif // NDEBUG using namespace TDEIO; @@ -765,10 +765,8 @@ void SlaveBase::sigsegv_handler(int sig) snprintf(buffer, sizeof(buffer), "tdeioslave: ####### CRASH ###### protocol = %s pid = %d signal = %d\n", s_protocol, getpid(), sig); write(2, buffer, strlen(buffer)); #ifndef NDEBUG -#ifdef HAVE_BACKTRACE print_trace(); #endif -#endif ::exit(1); #endif } |