[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:29:43 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=0c48c00
The following commit has been merged in the master branch:
commit 0c48c00fa7d8eece3f508552bb908e35f573e031
Author: Albert Vaca <albertvaka at gmail.com>
Date: Wed Jun 1 12:43:34 2016 +0200
Added debug function to print a stack trace
---
core/CMakeLists.txt | 1 +
core/{backends/linkprovider.cpp => core_debug.cpp} | 17 +++++++++++++----
core/core_debug.h | 2 ++
tests/CMakeLists.txt | 1 +
4 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 2083668..0b16096 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -28,6 +28,7 @@ set(kdeconnectcore_SRCS
filetransferjob.cpp
daemon.cpp
device.cpp
+ core_debug.cpp
)
add_library(kdeconnectcore ${kdeconnectcore_SRCS})
diff --git a/core/backends/linkprovider.cpp b/core/core_debug.cpp
similarity index 72%
copy from core/backends/linkprovider.cpp
copy to core/core_debug.cpp
index 1d6c0bf..6fcf807 100644
--- a/core/backends/linkprovider.cpp
+++ b/core/core_debug.cpp
@@ -18,10 +18,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "linkprovider.h"
+#include "core_debug.h"
-LinkProvider::LinkProvider()
+#include <execinfo.h>
+#include <stdlib.h>
+#include <execinfo.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+void logBacktrace()
{
- //gcc complains if we don't add something to compile on a class with virtual functions
+ void *array[32];
+ size_t size = backtrace (array, 32);
+ char **strings = backtrace_symbols (array, size);
+ backtrace_symbols_fd(array, size, STDERR_FILENO);
+ free (strings);
}
-
diff --git a/core/core_debug.h b/core/core_debug.h
index d74745c..1960bcf 100644
--- a/core/core_debug.h
+++ b/core/core_debug.h
@@ -27,4 +27,6 @@
KDECONNECTCORE_EXPORT Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_CORE)
+void logBacktrace();
+
#endif //CORE_DEBUG_H
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 1d45b86..6b6e661 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -50,6 +50,7 @@ set(lanlinkprovidertest_sources
../core/backends/pairinghandler.cpp
../core/device.cpp
../core/pluginloader.cpp
+ ../core/core_debug.cpp
)
ecm_add_test(lanlinkprovidertest.cpp ${lanlinkprovidertest_sources} TEST_NAME lanlinkprovidertest LINK_LIBRARIES ${kdeconnect_libraries})
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list