This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]