This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH/RFC] Move the cmdarg before load execarg
On Sun, 30 Jan 2011 01:31:46 +0100, Hui Zhu wrote:
> Do you think we can add some other options to let gdb exec some
> command before load the file?
> Cause my gdb support multi-arch, but need "set gnutarget" everytime
> when I use it. So I want add a alias in my bashrc like alias
> arm-gdb='gdb -ex "set gnutarget"' or a shell to make it works better.
~/.gdbinit is read before anything else.
first: mv ~/.gdbinit ~/.gdbinit2
alias arm-gdb='echo -e "set gnutarget elf32-littlearm\nsource ~/.gdbinit2" >~/.gdbinit; /usr/bin/gdb'
alias gdb='echo -e "source ~/.gdbinit2" >~/.gdbinit; /usr/bin/gdb'
Regards,
Jan