From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28075 invoked by alias); 2 Apr 2004 22:47:56 -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 28056 invoked from network); 2 Apr 2004 22:47:53 -0000 Received: from unknown (HELO esds.vss.fsi.com) (66.136.174.212) by sources.redhat.com with SMTP; 2 Apr 2004 22:47:53 -0000 Received: from thing1.vss.fsi.com (thing1.vss.fsi.com [198.51.29.21]) by esds.vss.fsi.com (8.11.6+Sun/8.9.1) with ESMTP id i32MlqW13897; Fri, 2 Apr 2004 16:47:52 -0600 (CST) Received: from localhost (ford@localhost) by thing1.vss.fsi.com (8.11.6+Sun/8.11.6) with ESMTP id i32MlqA25072; Fri, 2 Apr 2004 16:47:52 -0600 (CST) X-Authentication-Warning: thing1-200.fsi.com: ford owned process doing -bs Date: Fri, 02 Apr 2004 22:47:00 -0000 From: Brian Ford X-X-Sender: ford@thing1-200 To: Eli Zaretskii cc: jimb@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [PATCH] i386_stab_reg_to_regnum (4 <-> 5, ebp <-> esp) In-Reply-To: <6654-Fri02Apr2004213037+0300-eliz@gnu.org> Message-ID: References: <8011-Fri02Apr2004094123+0300-eliz@gnu.org> <6654-Fri02Apr2004213037+0300-eliz@gnu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-04/txt/msg00081.txt.bz2 On Fri, 2 Apr 2004, Eli Zaretskii wrote: > > Some time ago I did find a problem in register numbering, and IIRC it > > was fixed, although I don't recall the details and don't see anything > > in the logs. > > Found it. See the thread started by this message: > > http://sources.redhat.com/ml/gdb/2001-07/msg00392.html > Thanks. Things sure have changed since then, haven't they ;-). Some comments: > (Btw, I don't see any COFF_REG_TO_REGNUM.) > Now that is set_gdbarch_sdb_reg_to_regnum, and it uses i386_stab_reg_to_regnum. Mark Kettenis wrote: > With the patch that I just checked in, COFF and stabs should do the > right thing for DJGPP. > Um..., except the ebp <-> esp thing. > DWARF2 will probably still give you the wrong > register. > Yup. I don't see that you fixed that. > You might want to consider changing GCC such that it uses > the standard Dwarf renumbering for DWARF2. I don't think it really > matters since there aren't any native tools that you need to be > compatible with. On the other hand, using DWARF2 with a numbering > scheme that nobody else uses, might trigger some bugs. > Precisely my reasoning (what do ya think, Jim?). > If you don't change GCC you should probably override > DWARF2_REG_TO_REGNO in config/i386/tm-go32.h. > You would now do that by calling set_gdbarch_dwarf2_reg_to_regnum in i386_go32_init_abi with i386_stab_reg_to_regnum as the argument. Andrew Cagney wrote: > Yep. > > They map a stab/dwarf/... reg onto a cooked regnum (not to be confused > with a raw reg found in the register cache). Because the i386 > implements its registers using the old PSUEDO / CONVERT stuff, the > importance of differentiating between the two may not be obvious. > Wish I knew how all this cooked regnum stuff worked. That's why I can't figure out a testcase for you. If it's internally cooked wrong, but straightened out by the back end, how do you tell? > There is something here I don't get either. > > At present it is assumed that, for a given ISA/ABI, there is only one > mapping from a DEBUG reg to a REGNUM. I take it, Mark, that you're > saying that in reality, the mapping depends on all of: > > (compiler, object format, debug format, ISA/ABI) (debug reg) -> REGNUM > > True? Ulgh! > True, and I think all the hooks are there to accomodate this. They just aren't all fully used/consistent yet. -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International Phone: 314-551-8460 Fax: 314-551-8444