From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sourceware.org
Subject: Re: [rfc] Autoselect x86_64 or i386 based on the remote g packet size
Date: Thu, 09 Nov 2006 21:49:00 -0000 [thread overview]
Message-ID: <20061109214924.GA21448@nevyn.them.org> (raw)
In-Reply-To: <20030.82.92.89.47.1163108189.squirrel@webmail.xs4all.nl>
On Thu, Nov 09, 2006 at 10:36:29PM +0100, Mark Kettenis wrote:
> Hi Daniel,
>
> I can't say I'm very enthousiastic about this patch. It feels like a
> kludge to avoid adding proper support to the remote protocol that allows
> gdb to interrogate the target about this. A very clever kludge, but still
> a kludge.
True. I'm not avoiding it, though; that interrogation happens to be
mentioned here:
http://sourceware.org/ml/gdb-patches/2006-11/msg00055.html
Something I haven't implemented yet, but probably will before posting
the XML bits: this is enough to implement a remote target which can
tell you its architecture! Pretty neat, though a little tricky to get
right. What we ought to do at that point is validate that the remote
target and the selected executable have sufficiently compatible
architectures. Then GDB will be able to warn me when I connect a MIPS
cross GDB to an i386 gdbserver by accident (which I do probably once a
week).
Honestly, this clever auto-detection is much more useful for MIPS than
it is for i386/AMD64; for MIPS, an executable file doesn't necessarily
contain the answer to the question, but for i386 it always does. I
implemented the AMD64 bits after I had it working for MIPS, as a demo
when Jan K. posted an even kludgier patch to warn about this case a
couple of weeks ago. If you don't like this bit, I'd be happy to drop
it, and make gdbserver report the architecture manually when I advance
to the XML stage of these target descriptions. I won't mourn the i386
parts of this patch. Would you rather I did that?
(I'd like to hold on to the MIPS bits, because they're solving a
slightly different problem, and because I know they're useful with
existing non-gdbserver stubs that would be harder to fix.)
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-11-09 21:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-09 20:58 Daniel Jacobowitz
2006-11-09 21:36 ` Mark Kettenis
2006-11-09 21:49 ` Daniel Jacobowitz [this message]
2006-11-20 4:26 ` Daniel Jacobowitz
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=20061109214924.GA21448@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
/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