Re: [PATCH/RFC] Move the cmdarg before load execarg

Hui Zhu
2011-02-08T13:39:55Z

On Mon, Jan 31, 2011 at 19:04, Jan Kratochvil <jan.kratochvil@redhat.com> wrote:
> 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
>

Thanks Jan. This way is cool.

Hui