From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14571 invoked by alias); 2 Apr 2004 23:15: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 14561 invoked from network); 2 Apr 2004 23:15:53 -0000 Received: from unknown (HELO esds.vss.fsi.com) (66.136.174.212) by sources.redhat.com with SMTP; 2 Apr 2004 23:15: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 i32NFqW14504; Fri, 2 Apr 2004 17:15:52 -0600 (CST) Received: from localhost (ford@localhost) by thing1.vss.fsi.com (8.11.6+Sun/8.11.6) with ESMTP id i32NFqs25130; Fri, 2 Apr 2004 17:15:52 -0600 (CST) X-Authentication-Warning: thing1-200.fsi.com: ford owned process doing -bs Date: Fri, 02 Apr 2004 23:15: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: <2719-Fri02Apr2004213907+0300-eliz@gnu.org> Message-ID: References: <8011-Fri02Apr2004094123+0300-eliz@gnu.org> <2719-Fri02Apr2004213907+0300-eliz@gnu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-04/txt/msg00084.txt.bz2 On Fri, 2 Apr 2004, Eli Zaretskii wrote: > Brian Ford wrote talking about DJGPP: > > I just don't see any reason to try and be "compatible" with it. I'm not > > even sure what that means? I certainly don't want to break it, > > though. > > Well, the only way to break DJGPP is if you modify code used by it as > well. So any pieces of coffread.c or dwarf2read.c, or anything in > i386-related files that is related to that, are possible areas of > interest. If you only change Windows-specific files, you cannot > possibly break DJGPP (or any other non-Windows target). > I understand that. Getting back to the original subject, we're talking about fixing i386_stab_reg_to_regnum. That would affect DJGPP. All indications are, however, that the patch is correct. If it breaks other targets, then those other targets will need to be fixed again ;-). > However, what I'm really interested in is the possibility that a > similar problem exists in the DJGPP port. > It should, I just haven't figured out how to show you, especially if the target backend has already "fixed" it. > > Eli Zaretskii wrote: > > > I marked this thread for checking, but never had time to do it. If > > > you can send me a sample program and a description of what I should do > > > to see whether DJGPP has the same problem, I will gladly try that and > > > report the results. Please also tell what versions of GCC and GDB > > > should I try. > > > > > You mean source code, right? You would obviously need a DJGPP toolchain > > for testing. I don't have one right now. > > Well, I do have it, obviously: otherwise, how could I possibly be > maintaining the DJGPP port of GDB? ;-) > Sorry, I wasn't looking carefully and didn't know (blush...). > > A sample program would be trivial, so you might as well make one yourself. > > Just throw in some stack variables, preferably some in main, and some in > > a function called from main. Oh, and make a few of them floating point > > so you can test that too. > > I understand this, but given my total lack of free time, I'd > appreciate a specific worked-out example with commands you type and > what GDB prints in response. I don't mean for you to install the > DJGPP development environment and try that, just do that with the > Windows tools where you encountered the problem. All I want to see is > whether similar problems with EBP and ESP exist in the DJGPP port. > Ok, I'm trying to find a simple step-by-step. As a quick test, does a simple "bt" for a DWARF 2 compiled program stop at main, or run off infinately? What about for stabs? That's one way to tell about ebp <-> esp, maybe. Can you try Jim's example program here compiled for DWARF 2? http://sources.redhat.com/ml/gdb-patches/2004-04/msg00025.html Try an info address a in foo and see what you get. That should confirm Mark's suspicion about having the wrong register translation function for DWARF 2 on DJGPP. Also, can you confirm the dumped DWARF info has a DW_AT_frame_base of DW_OP_reg4, not 5? How often does DJGPP use sdb, stabs, dwarf 2? I just realized that DWARF 2 is not the default. I've got to go out-of-town now for the weekend, but I'll work on an exact step by step when I get back on Monday. > Of course, if you are not interested to see whether other i386 targets > have this problem, you are free to disregard my request. > I'm interested in fixing Cygwin. I may need to change generic i386 code to do that. So, I guess I have to be interested ;-). Thanks a lot for your help and comments. -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International Phone: 314-551-8460 Fax: 314-551-8444