From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 437 invoked by alias); 6 Nov 2007 13:49:08 -0000 Received: (qmail 426 invoked by uid 22791); 6 Nov 2007 13:49:07 -0000 X-Spam-Check-By: sourceware.org Received: from gum.itee.uq.edu.au (HELO gum.itee.uq.edu.au) (130.102.66.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 06 Nov 2007 13:49:04 +0000 Received: from filter1.itee.uq.edu.au (filter1.itee.uq.edu.au [130.102.79.21]) by gum.itee.uq.edu.au (8.13.1/8.13.1) with ESMTP id lA6DmxLK018915 for ; Tue, 6 Nov 2007 23:48:59 +1000 Received: from g5099368 (g509-9368.itee.uq.edu.au [130.102.64.130]) by filter1.itee.uq.edu.au (8.13.1/8.13.1) with SMTP id lA6Dmwsm027198 for ; Tue, 6 Nov 2007 23:48:59 +1000 Message-ID: <002001c8207b$c84042e0$82406682@itee.uq.edu.au> Reply-To: "Yi Tang" From: "Yi Tang" To: Subject: asm debug problem Date: Tue, 06 Nov 2007 13:49:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook Express 6.00.2900.3138 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/msg00037.txt.bz2 Hello maintainer, I have got some trouble using gdb for my source code. My code, written in asm and compiled by gcc, should be attached to an rtos library (ecos) to perform some test. I found it is not possible to debug the assemble source code. My assemble code, to build the function (usr_interrupt_vsr()), is in a separate file called uivsr.S. And it is linked to the OS through a head file. However, when I run the gdb, it goes to some other file in OS kernel, the clock.cxx (also wrong line num, I'm pretty sure no such function in this file). And the language is set to C++. I also tried gas as assembler, same situation. Following is the snapshot, hope you guys can give me some hints. Regards, Tony Current language: auto; currently c++ Loading section .rom_vectors, size 0x1390 lma 0x40000000 Loading section .text, size 0x54b8 lma 0x40001390 Loading section .rodata, size 0x218 lma 0x40006848 Loading section .data, size 0x354 lma 0x40006a60 Start address 0x40001208, load size 28084 Transfer rate: 532398 bits/sec, 275 bytes/write. Breakpoint 1, cyg_user_start () at astest.c:10 Current language: auto; currently c 0x400013a0 in usr_interrupt_vsr () at /ecos-c/Cygwin/ecos/ecos-dtimer/packages/kernel/current/src/common/clock.cxx:85 Current language: auto; currently c++