[kdebindings: 1/2] +gdb/valgrind debugging

Rex Dieter rdieter at fedoraproject.org
Sat Jan 8 23:55:43 UTC 2011


commit 9119c6a789269ba644f308c4389eaa8bb9a380be
Author: Rex Dieter <rdieter at fedoraproject.org>
Date:   Sat Jan 8 17:53:43 2011 -0600

    +gdb/valgrind debugging

 kdebindings.spec |    9 ++++++++-
 smokegen.gdb     |    4 ++++
 2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/kdebindings.spec b/kdebindings.spec
index 4493484..e26ed57 100644
--- a/kdebindings.spec
+++ b/kdebindings.spec
@@ -50,6 +50,10 @@ Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/%{name}-%{version}.tar.
 #Source0: kdebindings-1130463.tar.bz2
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+## DEBUGGING
+BuildRequires: gdb valgrind
+Source10: smokegen.gdb
+
 ## upstreamable patches
 
 ## upstream patches
@@ -308,7 +312,10 @@ pushd %{_target_platform}
 popd
 
 # smp build not recommended (upstream)
-make %{?_smp_mflags} -C %{_target_platform}
+make %{?_smp_mflags} -C %{_target_platform} || \
+  gdb -batch -x %{SOURCE10} ; \
+  valgrind ./generator/bin/smokegen -config ./smoke/kde/akonadi/config.xml -smokeconfig ../smoke/kde/akonadi/smokeconfig.xml -I /usr/include -- ../smoke/kde/akonadi/akonadi_includes.h
+
 
 %install
 rm -rf %{buildroot}
diff --git a/smokegen.gdb b/smokegen.gdb
new file mode 100644
index 0000000..80bfbf5
--- /dev/null
+++ b/smokegen.gdb
@@ -0,0 +1,4 @@
+exec-file ./generator/bin/smokegen 
+set args -config ./smoke/kde/akonadi/config.xml -smokeconfig ../smoke/kde/akonadi/smokeconfig.xml -I /usr/include -- ../smoke/kde/akonadi/akonadi_includes.h
+run
+bt


More information about the scm-commits mailing list