From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31345 invoked by alias); 20 Nov 2007 12:19:51 -0000 Received: (qmail 31335 invoked by uid 22791); 20 Nov 2007 12:19:50 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 20 Nov 2007 12:19:46 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id A84DF3C16B; Tue, 20 Nov 2007 03:59:36 -0800 (PST) Subject: Re: add-symbol-file question From: Michael Snyder To: vb Cc: gdb@sourceware.org In-Reply-To: References: Content-Type: text/plain Date: Tue, 20 Nov 2007 12:19:00 -0000 Message-Id: <1195560538.23780.19.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-4.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00194.txt.bz2 On Mon, 2007-11-19 at 16:50 -0800, vb wrote: > Greetings, > > I am trying to debug very early stages of bringing up a ppc82xx > kernel. (it's not relevant. but just in case: I'm using a bdi2000) > > For some reason gdb fails to read the symbol table such that the text > segment is placed at 0: > > vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv > (gdb) show version > GNU gdb 6.5 > Copyright (C) 2006 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "--host=i686-pc-linux-gnu > --target=powerpc-8540-linux-gnu". > (gdb) sym > Discard symbol table? (y or n) y > No symbol file now. > (gdb) add-symbol-file ../build/linux-2.6-lb4-powerpc/vmlinux 0x40000000 > add symbol table from file "../build/linux-2.6-lb4-powerpc/vmlinux" at > .text_addr = 0x40000000 > (y or n) y > Reading symbols from > /local/vb/projects/vanilla-wt/build/linux-2.6-lb4-powerpc/vmlinux...done. > (gdb) p __start > $7 = {} 0x4000000c <__start> > (gdb) sym > Discard symbol table? (y or n) y > No symbol file now. > (gdb) add-symbol-file ../build/linux-2.6-lb4-powerpc/vmlinux 0x00000000 > add symbol table from file "../build/linux-2.6-lb4-powerpc/vmlinux" at > .text_addr = 0x0 > (y or n) y > Reading symbols from > /local/vb/projects/vanilla-wt/build/linux-2.6-lb4-powerpc/vmlinux...done. > (gdb) p __start > $8 = {} 0x8000000c <__start> > (gdb) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > I tried loading it at different offsets, anything else but 0 works > just fine, anyone knows what's wrong?! Interesting -- it appears to be setting the MSB. Some sort of problem with sign bits, I expect...