From a899dc279feae68a07b4a398c486e656827f03b8 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Wed, 23 Jan 2008 19:56:25 +0200 Subject: [PATCH] Add helper script running debuging tools --- src/debug-mapper.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 src/debug-mapper.sh diff --git a/src/debug-mapper.sh b/src/debug-mapper.sh new file mode 100755 index 0000000..a0196d4 --- /dev/null +++ b/src/debug-mapper.sh @@ -0,0 +1,19 @@ +#!/bin/sh +export G_SLICE=always-malloc +export G_DEBUG=gc-friendly + +case "$1" in + valgrind) + libtool --mode=execute valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 mapper + ;; + massif) + libtool --mode=execute valgrind --tool=massif --depth=5 --alloc-fn=g_malloc --alloc-fn=g_realloc --alloc-fn=g_try_malloc \ + --alloc-fn=g_malloc0 --alloc-fn=g_mem_chunk_alloc mapper + ;; + gdb) + libtool --mode=execute gdb mapper + ;; + *) + echo "Mode: valgrind or massif" + ;; +esac -- 2.39.5