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
- From: Hui Zhu <teawater at gmail dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches ml <gdb-patches at sourceware dot org>
- Date: Tue, 8 Feb 2011 21:39:26 +0800
- Subject: Re: [PATCH/RFC] Move the cmdarg before load execarg
- References: <AANLkTik=q2dyCeMD5A3-dvjSsnzBxLb8y1NtA8-2-i_h@mail.gmail.com> <20110128095213.GA18993@host1.dyn.jankratochvil.net> <m3ei7xgrdu.fsf@fleche.redhat.com> <AANLkTik8JTrT81fzsZS28371RdnmJi28gm7=tH4QCAcA@mail.gmail.com> <20110131110412.GA13702@host1.dyn.jankratochvil.net>
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