[vlc-devel] [PATCH] make-alias: add --gdb argument to run in gdb

Rafaël Carré funman at videolan.org
Sun Jan 29 03:22:04 CET 2012


example: cvlc --gdb --random --sout=long_command_line
---
 make-alias |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/make-alias b/make-alias
index df67b4e..7ce7395 100755
--- a/make-alias
+++ b/make-alias
@@ -7,7 +7,14 @@ IFACE="$2"
 
 cat > "$OUT.tmp" << EOF
 #! /bin/sh
-exec $bindir/`echo "$program_prefix"vlc"$program_suffix" | sed -e "$transform"` -I "$IFACE" "\$@"
+VLC="$bindir/`echo ${program_prefix}vlc${program_suffix} | sed -e $transform`"
+if [ "\$1" = "--gdb" ]
+then
+    shift
+    exec gdb --args "\$VLC" -I "$IFACE" "\$@"
+else
+    exec "\$VLC" -I "$IFACE" "\$@"
+fi
 EOF
 
 chmod +x "$OUT.tmp"
-- 
1.7.8.3



More information about the vlc-devel mailing list