From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10458 invoked by alias); 19 Apr 2004 19:59:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 10449 invoked from network); 19 Apr 2004 19:59:38 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.77.109) by sources.redhat.com with SMTP; 19 Apr 2004 19:59:38 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i3JJxXpH000249; Mon, 19 Apr 2004 21:59:33 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i3JJxXee000341; Mon, 19 Apr 2004 21:59:33 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i3JJxQoQ000336; Mon, 19 Apr 2004 21:59:26 +0200 (CEST) Date: Mon, 19 Apr 2004 19:59:00 -0000 Message-Id: <200404191959.i3JJxQoQ000336@elgar.kettenis.dyndns.org> From: Mark Kettenis To: eliz@gnu.org CC: ford@vss.fsi.com, gdb-patches@sources.redhat.com In-reply-to: (message from Eli Zaretskii on 19 Apr 2004 08:50:59 +0200) Subject: Re: [PATCH] Proper _to_regnum for DWARF on Cygwin References: <200404161650.i3GGoPxI054716@elgar.kettenis.dyndns.org> <200404181838.i3IIccMf006115@elgar.kettenis.dyndns.org> X-SW-Source: 2004-04/txt/msg00445.txt.bz2 Date: 19 Apr 2004 08:50:59 +0200 From: Eli Zaretskii > Date: Sun, 18 Apr 2004 20:38:38 +0200 (CEST) > From: Mark Kettenis > > + /* We typically use DWARF-in-COFF with the dbx register numbering. */ > + set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_dbx_reg_to_regnum); > + set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_dbx_reg_to_regnum); > } Mark, doesn't this code above from i386_coff_init_abi contradict the code further down (and the register mapping used by GCC), viz: > + /* Use the SVR4 register numbering scheme for DWARF and DWARF 2. */ > + set_gdbarch_dwarf_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum); > + set_gdbarch_dwarf2_reg_to_regnum (gdbarch, i386_svr4_reg_to_regnum); ? For DJGPP, at least, DWARF2-in-COFF uses i386_svr4_reg_to_regnum register mapping, not i386_dbx_reg_to_regnum. Am I missing something here? Hmm. I very much agree with what Brian wrote in his follow-up messages. I think DJGPP is doing the right thing using the SVR4 scheme for DWARF2 while staying backwards compatible for stabs. I'd advise him to do the same for cygwin. If i386_coff_init_abi will be gone, the comments aren't contradictiory anymore. > + /* NOTE: kettenis/20040418: GCC does have two possible register > + numbering schemes on the i386: dbx and SVR4. These schemes > + differ in how they number %ebp, %esp, %eflags, and the > + floating-point registers, and are implemented by the attays ^^^^^^ A typo. I though I'd fixed that one :-(.