From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3774 invoked by alias); 5 Apr 2004 22:46:18 -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 3539 invoked from network); 5 Apr 2004 22:46:10 -0000 Received: from unknown (HELO esds.vss.fsi.com) (66.136.174.212) by sources.redhat.com with SMTP; 5 Apr 2004 22:46:10 -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 i35MkAB28338; Mon, 5 Apr 2004 17:46:10 -0500 (CDT) Received: from localhost (ford@localhost) by thing1.vss.fsi.com (8.11.6+Sun/8.11.6) with ESMTP id i35MkAH17592; Mon, 5 Apr 2004 17:46:10 -0500 (CDT) X-Authentication-Warning: thing1-200.fsi.com: ford owned process doing -bs Date: Mon, 05 Apr 2004 22:46: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-Sat03Apr2004110513+0300-eliz@gnu.org> Message-ID: References: <8011-Fri02Apr2004094123+0300-eliz@gnu.org> <2719-Fri02Apr2004213907+0300-eliz@gnu.org> <6654-Sat03Apr2004110513+0300-eliz@gnu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-04/txt/msg00130.txt.bz2 On Sat, 3 Apr 2004, Eli Zaretskii wrote: > On Fri, 2 Apr 2004, Brian Ford wrote: > > > Ok, I'm trying to find a simple step-by-step. > > Thank you. Jim beat me to it. > > As a quick test, does a simple "bt" for a DWARF 2 compiled program stop at > > main, or run off infinately? > > It stops at main. Here's a session transcript, using the test > program from the message you referred to: I realized this morning that this problem only happens in DWARF 2 if your ebp and esp are reversed. DJGPP's are ok in DWARF 2, just not in stabs. See Jim's example and my response for how to test that. Thanks for testing anyway. > > Can you try Jim's example program here compiled for DWARF 2? and STABS? > > http://sources.redhat.com/ml/gdb-patches/2004-04/msg00025.html > > > > Try an info address a in foo and see what you get. > > I get the following, no matter whether I compile with "-gstabs+" or > "-gdwarf-2": > > (gdb) info address a > Symbol "a" is a variable in register st4. I'm sorry, but are you sure you get the same register number in both cases? I don't see how that can be given my current understanding of the issues. > > Also, can you confirm the dumped DWARF info has a DW_AT_frame_base of > > DW_OP_reg4, not 5? Please check it for foo and main if you do this. > I cannot use readelf here, since DJGPP binaries are COFF files, not > ELF files. Is there a way to do this using objdump? No, see Jim's reply. I do have a hacked version of dwarfdump that works on COFF files. Let me know if you are interested and would trust me to send you the executable directly. > > How often does DJGPP use sdb, stabs, dwarf 2? > > I don't have statistics (but see below). I myself use all of them > roughly the same. Yeah, I just meant relatively. > > I just realized that DWARF 2 is not the default. > > Well, it is in DJGPP: GCC 3.2 and later use DWARF-2 by default. So I > guess, for the random DJGPP user, DWARF-2 is much more frequent these > days that either -gstabs+ or -gcoff. I'm confused here. I just did another pass through the gcc sources (3.4 branch in this case) and looked at all the djgpp config files: ford@fordpc ~/downloads/gcc/gcc/config $ fgrep DEBUGGING i386/xm-djgpp.h i386/i386.h dbxcoff.h i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h dbxcoff.h:#define DBX_DEBUGGING_INFO 1 dbxcoff.h:#ifndef PREFERRED_DEBUGGING_TYPE dbxcoff.h:#define PREFERRED_DEBUGGING_TYPE SDB_DEBUG i386/gas.h:#define SDB_DEBUGGING_INFO 1 i386/djgpp.h:#define DWARF2_DEBUGGING_INFO 1 That makes it appear that the default debugging type is SDB_DEBUG (coff). I've got to be missing something obvious here? Thanks again for your time. -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International Phone: 314-551-8460 Fax: 314-551-8444