This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Suggest fixing your target for gdbserver(1)
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 26 Sep 2006 11:33:31 -0400
- Subject: Re: [patch] Suggest fixing your target for gdbserver(1)
- References: <20060926152715.GA5860@host0.dyn.jankratochvil.net>
On Tue, Sep 26, 2006 at 05:27:15PM +0200, Jan Kratochvil wrote:
> Hi,
>
> x86_64 defaults (by bfd matching) to target "i386" instead of its native
> "i386:x86_64". Therefore if you connect to gdbserver(1) without any `file' or
> `set architecture' command before the communication will crash on a different
> expected register sizes.
>
> As implementing architecture negotiation is complicated due to gdbserver(1) not
> being aware of bfd-compatible name of its target and also it may be also
> unclear to automatically change the target while working remotely it is just
> suggesting to double-check which architecture you are using.
As a matter of fact I'm implementing automatic detection of 32-bit vs
64-bit targets based on the size of register responses right now.
I hope to have it done later in the week, though it will be tricky
to break it apart from the rest of my patches for merging.
--
Daniel Jacobowitz
CodeSourcery