From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12428 invoked by alias); 14 Jun 2005 14:58:16 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 12418 invoked by uid 22791); 14 Jun 2005 14:58:10 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 14 Jun 2005 14:58:10 +0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DiCrg-00015I-S2; Tue, 14 Jun 2005 10:58:08 -0400 Date: Tue, 14 Jun 2005 14:58:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: problem debugging assembler functions Message-ID: <20050614145808.GA4100@nevyn.them.org> Mail-Followup-To: Vladimir Prus , gdb@sources.redhat.com References: <20050614143654.GB3288@nevyn.them.org> <200506141854.04712.ghost@cs.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200506141854.04712.ghost@cs.msu.su> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-06/txt/msg00134.txt.bz2 On Tue, Jun 14, 2005 at 06:54:03PM +0400, Vladimir Prus wrote: > > > 2. In my case, no function names for assembler modules are present in > > > debug info, but line information is there, so the function is debuggable. > > > Is there a way to check of line info in condition, not for function name? > > > > You have line numbers, but not even minimal symbols? That is, ELF > > symbols, not DWARF2 symbols. > > Exactly. ELF symbol table is absolutely empty. > > > That's really bizarre. > > Well, for a binary for embedded system with no dynamic linking this is not so > unreasonable. Anyway, that's not something I can easily change. Not having dynamic symbols, sure, that's perfectly reasonable. Those go into target memory. But this is far from the only thing in GDB that is not going to work without a static symbol table! For instance, you can't use prologue analysis. You'll never find the start of any function. > > We don't have a > > good interface for handling functions with line numbers but no sym or > > minsym, but perhaps we need one. I agree that the presence of line > > number information seems more relevant right here. > > FWIW, I've just modified that code to be: > > ecs->sal = find_pc_line (stop_pc, 0); > ....... > if (step_over_calls == STEP_OVER_UNDEBUGGABLE > && ecs->sal.line == 0) > > and it works as expected. Does the change seem reasonable? I'm not thrilled with adding another lookup here; this code executes quite a few times when stepping. It does seem plausible, but it would need wider testing. -- Daniel Jacobowitz CodeSourcery, LLC