From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9911 invoked by alias); 28 Dec 2009 04:22:10 -0000 Received: (qmail 9902 invoked by uid 22791); 28 Dec 2009 04:22:09 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from nwd2mail10.analog.com (HELO nwd2mail10.analog.com) (137.71.25.55) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Dec 2009 04:22:03 +0000 Received: from nwd2hubcas2.ad.analog.com ([10.64.73.30]) by nwd2mail10.analog.com with ESMTP; 27 Dec 2009 23:22:01 -0500 Received: from nwd2exm5.ad.analog.com (10.64.51.20) by NWD2HUBCAS2.ad.analog.com (10.64.73.30) with Microsoft SMTP Server id 8.1.358.0; Sun, 27 Dec 2009 23:22:01 -0500 Received: from nwd2exm20.ad.analog.com ([10.64.73.20]) by nwd2exm5.ad.analog.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 27 Dec 2009 23:22:01 -0500 Received: from chinexm1.ad.analog.com ([10.99.27.42]) by nwd2exm20.ad.analog.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 27 Dec 2009 23:22:01 -0500 Received: from [10.99.29.107] ([10.99.29.107]) by chinexm1.ad.analog.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 28 Dec 2009 12:21:57 +0800 Message-ID: <4B383264.30604@analog.com> Date: Mon, 28 Dec 2009 04:22:00 -0000 From: Jie Zhang User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Lightning/1.0pre Shredder/3.0 MIME-Version: 1.0 To: Hushan Jia CC: Paul Pluzhnikov , gdb@sourceware.org Subject: Re: gdb symbol problem References: <8ac60eac0912260055o2d6bcb6cld7f8830e947cdd7@mail.gmail.com> <8ac60eac0912261936q49f50cf6ofabf2c56055621af@mail.gmail.com> <4B381A0F.70803@analog.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed 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: 2009-12/txt/msg00167.txt.bz2 On 12/28/2009 12:14 PM, Hushan Jia wrote: > On Mon, Dec 28, 2009 at 10:38 AM, Jie Zhang wrote: >> On 12/27/2009 11:45 AM, Hushan Jia wrote: >>> >>> On Sun, Dec 27, 2009 at 11:36 AM, Paul Pluzhnikov >>> wrote: >>>> >>>> On Sat, Dec 26, 2009 at 6:16 PM, Hushan Jia wrote: >>>> >>>>> I invoke gdb like this: >>>>> >>>>> [hushan@hushan-t linux-2.6.31.3]$ gdb ./vmlinux >>>> >>>> Oh, you are not debugging a regular application. You probably should >>>> have mentioned that in your initial message. >>> >>> Sorry for forget the important information. >>> >> What's the output of "readelf -S vmlinux"? > > Hi, The output is: > > # readelf -S vmlinux > There are 77 section headers, starting at offset 0x3b569cc: > > Section Headers: > [Nr] Name Type Addr Off Size ES Flg Lk Inf Al > [ 0] NULL 00000000 000000 000000 00 0 0 0 > [ 1] .text.head PROGBITS c1000000 001000 0000a9 00 AX 0 0 4 > [ 2] .rel.text.head REL 00000000 3b575d4 000070 08 > 75 1 4 > [ 3] .text PROGBITS c10000c0 0010c0 291284 00 AX 0 0 32 It seems the machine was not executing code of your vmlinux. The code in your vmlinux starts from 0xc1000000. But when you connected with GDB, the stopped PC was 0xc0467118, which was just ahead of code sections of your vmlinux. Is it possbile the linux kernel running in your qemu was not the one you told GDB? Jie