From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15946 invoked by alias); 23 Mar 2007 07:22:19 -0000 Received: (qmail 15937 invoked by uid 22791); 23 Mar 2007 07:22:18 -0000 X-Spam-Check-By: sourceware.org Received: from mail.sunnorth.com.cn (HELO mswbj01.sunnorth.com.cn) (124.42.0.200) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 23 Mar 2007 07:22:14 +0000 Received: from maillog.sunnorth.com.cn (unverified [172.20.10.250]) by mswbj01.sunnorth.com.cn (Clearswift SMTPRS 5.2.5) with ESMTP id for ; Fri, 23 Mar 2007 15:21:50 +0800 Received: from ntns1cn.sunnorth.com.cn (ntns1cn.sunnorth.com.cn [172.20.10.252]) by maillog.sunnorth.com.cn (8.12.10/8.12.10) with ESMTP id l2N9EPO6022000 for ; Fri, 23 Mar 2007 17:14:25 +0800 To: gdb@sourceware.org Subject: How to avoid "but contains no code." in command "info line"? MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5 September 26, 2003 Message-ID: From: qinwei Date: Fri, 23 Mar 2007 07:22:00 -0000 Content-Type: text/plain; charset="US-ASCII" 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/msg00290.txt.bz2 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' and finally the branch in gdb/source.c is taken. Does gdb have commands to let codes that in user defined sections tobe added to the 'blockvector structure' and "info line" will print both the begin & end address? Thanks! if (start_pc == end_pc) { printf_filtered ("Line %d of \"%s\"", sal.line, sal.symtab->filename); wrap_here (" "); printf_filtered (" is at address "); print_address (start_pc, gdb_stdout); wrap_here (" "); printf_filtered (" but contains no code.\n"); } Best regards, Qinwei Mail qinwei@sunnorth.com.cn Phone +86-010-62981668-2708 Fax +86-010-62985972