From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 908 invoked by alias); 20 Nov 2007 00:50:41 -0000 Received: (qmail 895 invoked by uid 22791); 20 Nov 2007 00:50:40 -0000 X-Spam-Check-By: sourceware.org Received: from ug-out-1314.google.com (HELO ug-out-1314.google.com) (66.249.92.175) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 20 Nov 2007 00:50:38 +0000 Received: by ug-out-1314.google.com with SMTP id o2so1447798uge for ; Mon, 19 Nov 2007 16:50:34 -0800 (PST) Received: by 10.86.95.20 with SMTP id s20mr5598285fgb.1195519834558; Mon, 19 Nov 2007 16:50:34 -0800 (PST) Received: by 10.86.87.13 with HTTP; Mon, 19 Nov 2007 16:50:34 -0800 (PST) Message-ID: Date: Tue, 20 Nov 2007 00:50:00 -0000 From: vb To: gdb@sourceware.org Subject: add-symbol-file question MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: dfe82bfed02413e4 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/msg00191.txt.bz2 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?! TIA, /vb