Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Hui Zhu <teawater@gmail.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [PATCH/RFC] Move the cmdarg before load execarg
Date: Fri, 28 Jan 2011 09:58:00 -0000	[thread overview]
Message-ID: <20110128095213.GA18993@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <AANLkTik=q2dyCeMD5A3-dvjSsnzBxLb8y1NtA8-2-i_h@mail.gmail.com>

On Fri, 28 Jan 2011 07:41:22 +0100, Hui Zhu wrote:
> I got following trouble:
> gdb -q -ex "set gnutarget elf32-littlearm" ./vmlinux
> "/home/teawater/kernel/barm_versatile_926ejs/vmlinux": not in executable format: File format is ambiguous.
> Matching formats: elf32-littlearm elf32-littlearm-symbian elf32-littlearm-vxworks.
> Use "set gnutarget format-name" to specify the format.
> 
> Even if I use -ex to exec the command to set the gnutarget, but it is
> useless because cmdarg is exec after the vmlinux load.
> 
> I think -ex should have more high level than others.  So I make a
> patch let it exec before load execarg.
> What do you think about it?

It apparently breaks the much more common case of:
	gdb program -ex 'b main'

You should just use:
	gdb -q -ex "set gnutarget elf32-littlearm" -ex "file ./vmlinux"

as changing options required before the image load is generally an advanced
topic so I guess the "file" command requirement is OK in such case.


Thanks,
Jan


  reply	other threads:[~2011-01-28  9:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28  9:28 Hui Zhu
2011-01-28  9:58 ` Jan Kratochvil [this message]
2011-01-28 12:25   ` Tom Tromey
2011-01-30  0:52     ` Hui Zhu
2011-01-31 15:03       ` Jan Kratochvil
2011-02-08 13:39         ` Hui Zhu
2011-01-31 15:05       ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110128095213.GA18993@host1.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=teawater@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox