#!/bin/sh # Very simple gdb wrapper to support test scripts generated by libtool # (the programs generated for the "make check" of a library). # Limitations: # * It needs the "head" utility from the GNU Coreutils (but you can # remove the corresponding test if you don't have it). # * No support for gdb options, i.e. if there are gdb options, this # script will just call gdb with the provided arguments. # # Written by Vincent Lefevre in May 2011 and # released in the public domain. unset cmd case $1 in -*) ;; ?*) test "x$(head -c 2 "$1")" = 'x#!' && \ grep -q "^# Generated by libtool" "$1" && \ cmd="libtool --mode=execute" ;; esac exec $cmd gdb "$@" # $Id: gdb.wrapper 43574 2011-05-06 13:55:02Z vinc17/ypig $