From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20562 invoked by alias); 7 Feb 2002 15:30:08 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20464 invoked from network); 7 Feb 2002 15:30:03 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 7 Feb 2002 15:30:03 -0000 Received: from drow by nevyn.them.org with local (Exim 3.34 #1 (Debian)) id 16YqUs-0002rD-00; Thu, 07 Feb 2002 10:30:02 -0500 Date: Thu, 07 Feb 2002 07:30:00 -0000 From: Daniel Jacobowitz To: Don Bowman Cc: "'gdb@sources.redhat.com '" Subject: Re: MIPS stack tracing Message-ID: <20020207103002.A10834@nevyn.them.org> Mail-Followup-To: Don Bowman , "'gdb@sources.redhat.com '" References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-SW-Source: 2002-02/txt/msg00122.txt.bz2 On Thu, Feb 07, 2002 at 09:55:57AM -0500, Don Bowman wrote: > > > > > > Upon examination of gas, the .pdr section is only emitted if > > > MIPS_STABS_ELF is defined. Am I to assume that if I'm using > > > DWARF2 this won't occur? The code which actually emits it > > > seems to be in ecoff.c. > > > > No. It should be emitted unless we are emitting .mdebug, which we > > don't do any more for mips-*-linux. > > The code in gas is wrapped in #ifdef MIPS_STABS_ELF. Yes. That affects any assembler that supports stabs, not any assembler currently emitting stabs :) Bad naming perhaps. > > > This doesn't seem right to me, if I dump my .pdr section I get: > > > Contents of section .pdr: > > > 0000 00400080 00000000 00000000 00000000 .@.............. > > > 0010 00000000 00000000 00000000 00000000 ................ > > > 0020 74430080 00000000 00000000 00000000 tC.............. > > > 0030 00000000 00000000 00000000 00000000 ................ > > > 0040 b8430080 00000000 00000000 00000000 .C.............. > > > ... > > > > > > But all of my addresses start @ 0x80000000. > > > > Careful, it has relocations if you look at it in an object. Also > > careful, you have a host-target endian mismatch. That first word is > > 0x80000400. > > If I run objdump -r, there are no relocations, my image is fully > located. > > Interestingly, my host is little endian, my target is little endian. > Any guess on why those addresses whould show up as big endian? No idea... > Also, from gas, it appears a .pdr record is 7 words long, but the > .pdr shows an 8-word recurrence of the address. I assume it aligns? No, the first word is the address of the symbol and the other 7 are data. > So should the endianess be swapped here [ie reverse of both my host > and target]? Or do I have a bug in gas to fix first :) Is PDR a > standard of any sort, or is it just a gas invention? Not sure. But no bug in gas - only a bug in perhaps objdump. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer