From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14866 invoked by alias); 20 Nov 2006 04:26:28 -0000 Received: (qmail 14854 invoked by uid 22791); 20 Nov 2006 04:26:28 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 20 Nov 2006 04:26:24 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Gm0je-0007zo-HD for gdb-patches@sourceware.org; Sun, 19 Nov 2006 23:26:22 -0500 Date: Mon, 20 Nov 2006 04:26:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: [rfc] Autoselect x86_64 or i386 based on the remote g packet size Message-ID: <20061120042622.GA29356@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20061109205755.GA18755@nevyn.them.org> <20030.82.92.89.47.1163108189.squirrel@webmail.xs4all.nl> <20061109214924.GA21448@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061109214924.GA21448@nevyn.them.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00219.txt.bz2 On Thu, Nov 09, 2006 at 04:49:24PM -0500, Daniel Jacobowitz wrote: > 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.) Hi Mark, For avoidance of doubt, I'm definitely dropping the i386/amd64 patch. It was a stretch to begin with. I've already begun working on a patch to specifiy the architecture explicitly and I really hope I'll have it finished this week (but the way this entire project's been dragging out, I'm not sure...). Could you let me know if using the g packet size approach for the clearer-cut MIPS situation is OK with you? The difference, in my opinion, is that it doesn't reflect a change in architecture; you can run the same o32 ABI program on a 32-bit or 64-bit system, so it would be nice if GDB could handle 32-bit or 64-bit regsets automatically. This prevents a mips64 gdbserver having to figure out the child's ABI. -- Daniel Jacobowitz CodeSourcery