From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1692 invoked by alias); 23 Mar 2007 11:58:01 -0000 Received: (qmail 1684 invoked by uid 22791); 23 Mar 2007 11:58:01 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 23 Mar 2007 11:57:59 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id A68DF4B26D; Fri, 23 Mar 2007 06:57:57 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id 6C3EF4B262; Fri, 23 Mar 2007 06:57:52 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HUiP1-0007HK-WF; Fri, 23 Mar 2007 07:57:52 -0400 Date: Fri, 23 Mar 2007 11:58:00 -0000 From: Daniel Jacobowitz To: qinwei Cc: gdb@sourceware.org Subject: Re: How to avoid "but contains no code." in command "info line"? Message-ID: <20070323115751.GB27943@caradoc.them.org> Mail-Followup-To: qinwei , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.14+cvs20070313 (2007-03-13) 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-03/txt/msg00292.txt.bz2 On Fri, Mar 23, 2007 at 03:21:29PM +0800, qinwei wrote: > Dears, problems are here: > > In a assembly file 'a.s', we define two sections which have code both. > For example: > > line1: .section mysection > line2: load r4, [r3] > line3: jump func > ...... > > line6: .text > line7: store r4, [r3] > line8: jump func > ...... > > "info line a.s:7" will print both the begin and end address of the line. > but "info line a.s:2" just print the begin address and "but contains no > code." > > I trace the behavior of gdb (6.6 release) and find if the code is not in > .text, > then it will not be put to the 'blockvector structure' Are you sure? It sounds to me like your assembler is not emitting the right debug info. GDB doesn't care what section lines are in. -- Daniel Jacobowitz CodeSourcery