#!/bin/bash # A wrapper script for arm-eabi-gdb. # usage: arm-eabi-gdb [ ...] # This executes some gdb commands in arm-eabi-gdb.command that reflect # my personal setup, which uses the eCos distro with binary tools. # The procedure is documented here: http://ecos.sourceware.org/getstart.html #---------------------------------------------------------------------- # Find GDB if not defined. ## Pre-built, from eCos install. # ECOS=/opt/xc/ecos # ARM_GDB=$ECOS/gnutools/arm-eabi/bin/arm-eabi-gdb ## get from: http://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2 ## and build (in separate dir) using: configure --target=arm-eabi ARM_GDB_DEFAULT=arm-eabi-gdb-7.2 [ -z "$GDB" ] && GDB=$ARM_GDB_DEFAULT # Find command script HERE=`dirname $0` COMMAND=$0.command # For gdb in emacs (gud). This also triggers for ordinary comint. [ -z "$INSIDE_EMACS" ] || EMACS_OPTS="--annotate 3" exec $GDB $EMACS_OPTS \ --command=$COMMAND \ "$@"