From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32670 invoked by alias); 22 Nov 2009 17:04:41 -0000 Received: (qmail 32661 invoked by uid 22791); 22 Nov 2009 17:04:41 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pw0-f49.google.com (HELO mail-pw0-f49.google.com) (209.85.160.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Nov 2009 17:03:37 +0000 Received: by pwj21 with SMTP id 21so3350670pwj.8 for ; Sun, 22 Nov 2009 09:03:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.143.129.7 with SMTP id g7mr382257wfn.241.1258909416367; Sun, 22 Nov 2009 09:03:36 -0800 (PST) Date: Mon, 23 Nov 2009 00:04:00 -0000 Message-ID: <3a665c760911220903y352e7062m2acfd5fb27a1b169@mail.gmail.com> Subject: how to source level debug if I cannot see source embedded in elf file From: loody To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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-11/txt/msg00172.txt.bz2 Dear all: If my tool chain cannot generate elf file without source embedded even I compile them with "-g", can I do the source level debugging? one of my toolchain cannot generate elf file with source embedded in, I cannot see source code with "objdump -S testprogram.elf|less", but I can see the function name in the file as the end of letter. If I can do the source level debug, is there any setting or file I have to generate? appreciate your help, miloody /* source codes not embedded in the elf*/ 80000298
: 80000298: 27bdffd8 addiu sp,sp,-40 8000029c: afbf0024 sw ra,36(sp) 800002a0: afbe0020 sw s8,32(sp) 800002a4: 03a0f021 move s8,sp 800002a8: 24020017 li v0,23 800002ac: afc20018 sw v0,24(s8) 800002b0: 24020020 li v0,32 800002b4: afc20014 sw v0,20(s8) 800002b8: 2402002c li v0,44 800002bc: afc20010 sw v0,16(s8) 800002c0: 8fc30018 lw v1,24(s8) 800002c4: 8fc20014 lw v0,20(s8) 800002c8: 00621821 addu v1,v1,v0 800002cc: 8fc20010 lw v0,16(s8) 800002d0: 00621021 addu v0,v1,v0 800002d4: afc20018 sw v0,24(s8) 800002d8: 24040100 li a0,256 800002dc: 0c0000d8 jal 80000360 800002e0: 00000000 nop 800002e4: afc2001c sw v0,28(s8) 800002e8: 0c00009e jal 80000278 800002ec: 00000000 nop 800002f0: 03c0e821 move sp,s8 800002f4: 8fbf0024 lw ra,36(sp) 800002f8: 8fbe0020 lw s8,32(sp) 800002fc: 27bd0028 addiu sp,sp,40