From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6760 invoked by alias); 19 May 2004 14:22:09 -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 6747 invoked from network); 19 May 2004 14:22:08 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 19 May 2004 14:22:08 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i4JEM8GI000690 for ; Wed, 19 May 2004 10:22:08 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i4JELx016246; Wed, 19 May 2004 10:22:07 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 8AE862B9D; Wed, 19 May 2004 10:21:58 -0400 (EDT) Message-ID: <40AB6D86.4090409@gnu.org> Date: Wed, 19 May 2004 14:22:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Manoj Iyer Cc: Monika Chaddha , gdb@sources.redhat.com Subject: Re: List command question References: <004801c43a43$36fc9800$5100a8c0@monika> <40A905F7.5000502@gnu.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-05/txt/msg00129.txt.bz2 > I get no line number known for main... > > manjo@nefertiti:~/tests> gdb64 hellow1 > GNU gdb 6.1 > Copyright 2004 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 "ppc64-suse-linux"...Using host libthread_db > library "/lib64/tls/libthread_db.so.1". > > (gdb) list > 1 ../sysdeps/powerpc/powerpc64/elf/start.S: No such file or > directory. > in ../sysdeps/powerpc/powerpc64/elf/start.S > (gdb) list main > No line number known for main. > (gdb) GDB has the concept of a current source-and-line (SAL). When GDB starts it initializes it to something. Looking at the behavior you've illustrated, it tries in order: main's SAL; entry-point's SAL; ??? I guess the question is, should GDB set SAL to main when main doesn't have any line number information? Note here that this will end up interacting with the ``start'' mechanism that Joel is playing with - its a mechanism for doing run-to ``main''. So this will be a language dependent concept. Andrew