summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardbg-core
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-03-26 15:51:56 +0100
committerRobin Gareus <robin@gareus.org>2016-03-26 15:51:56 +0100
commit9228b3e00b1220d3625a7342c1d4587d7458ddd8 (patch)
treecfc85aa6483609a3ecd1e897fcc3afbef0e49081 /gtk2_ardour/ardbg-core
parentd5c1ea11c371e5f22b12cabe35aaa2abd9152a69 (diff)
add a script to read core files in gdb/lldb
Diffstat (limited to 'gtk2_ardour/ardbg-core')
-rwxr-xr-xgtk2_ardour/ardbg-core14
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk2_ardour/ardbg-core b/gtk2_ardour/ardbg-core
new file mode 100755
index 0000000000..d7c949d672
--- /dev/null
+++ b/gtk2_ardour/ardbg-core
@@ -0,0 +1,14 @@
+#!/bin/sh
+COREFILE=core
+TOP=`dirname "$0"`/..
+. $TOP/build/gtk2_ardour/ardev_common_waf.sh
+LD_LIBRARY_PATH=$LD_LIBRARY_PATH
+export ARDOUR_INSIDE_GDB=1
+
+if test -n "`which gdb`"; then
+ exec gdb --core $COREFILE --args $TOP/$EXECUTABLE $@
+fi
+if test -n "`which lldb`"; then
+ exec lldb -c $COREFILE -- $TOP/$EXECUTABLE $@
+fi
+echo "neither gdb nor lldb was found."