From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28124 invoked by alias); 24 Oct 2007 11:47:52 -0000 Received: (qmail 28108 invoked by uid 22791); 24 Oct 2007 11:47:51 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 24 Oct 2007 11:47:48 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 004589833F; Wed, 24 Oct 2007 11:47:47 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id B326E981F2; Wed, 24 Oct 2007 11:47:46 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1Ikei9-00050C-NN; Wed, 24 Oct 2007 07:47:45 -0400 Date: Wed, 24 Oct 2007 11:48:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: deuling@de.ibm.com, gdb-patches@sourceware.org, uweigand@de.ibm.com Subject: Re: [rfc] [17/17] Get rid of current_gdbarch in go32-nat.c Message-ID: <20071024114745.GA18617@caradoc.them.org> Mail-Followup-To: Eli Zaretskii , deuling@de.ibm.com, gdb-patches@sourceware.org, uweigand@de.ibm.com References: <470DE4C1.9070509@de.ibm.com> <471C3E2C.3010509@de.ibm.com> <471DCAAB.7080603@de.ibm.com> <20071023211528.GA5996@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00570.txt.bz2 On Wed, Oct 24, 2007 at 06:04:58AM +0200, Eli Zaretskii wrote: > > Date: Tue, 23 Oct 2007 17:15:28 -0400 > > From: Daniel Jacobowitz > > Cc: Markus Deuling , gdb-patches@sourceware.org, > > uweigand@de.ibm.com > > > > Even a single-architecture port may have more than one > > current_gdbarch. A gdbarch is fine-grained and e.g. different > > executables can lead to different gdbarches. So a GDB for DJGPP which > > supported debugging two programs at once might need more than one > > "current" gdbarch. > > Can you please describe an example where this is possible? Perhaps I > don't understand what is gdbarch, but I think this is impossible with > DJGPP. A gdbarch includes lots of information. Some examples: - What registers are available, including pseudo-registers and emulated registers. E.g., if DJGPP supports running binaries with and without MMX support available more than one gdbarch might be needed. - The sizes of basic types. E.g., if some versions of DJGPP used a 64-bit long double and other versions used an 80-bit long double. This transition seems to happen on many platforms at least once. - Mapping of debug info numbers to register numbers. E.g., if two compilers used different numbers this might be handled by setting a different function pointer in the gdbarch depending on the loaded binary. Maybe none of these apply now, but they may someday. -- Daniel Jacobowitz CodeSourcery