From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18468 invoked by alias); 14 Jun 2005 09:23:43 -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 18445 invoked by uid 22791); 14 Jun 2005 09:23:35 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 14 Jun 2005 09:23:35 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Di7Ye-0005Xl-LP for gdb@sources.redhat.com; Tue, 14 Jun 2005 11:18:08 +0200 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Jun 2005 11:18:08 +0200 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Jun 2005 11:18:08 +0200 To: gdb@sources.redhat.com From: Vladimir Prus Subject: problem debugging assembler functions Date: Tue, 14 Jun 2005 09:23:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 X-SW-Source: 2005-06/txt/msg00128.txt.bz2 Hello, I'm trying to port gdb to a new architecture (with it's own compiler), and run into problems with assembler functions. I can successfully step into an assembler function, but when I run "step", instead of moving to the next instruction, gdb sets breakpoint at return address and continues. Looking at the code, I see this (in infrun.c) Line 2285: if (frame_id_eq (frame_unwind_id (get_current_frame ()), step_frame_id)) { ...... } Line 2428: if (step_over_calls == STEP_OVER_UNDEBUGGABLE && ecs->stop_func_name == NULL) { /* The inferior just stepped into, or returned to, an undebuggable function (where there is no symbol, not even a minimal symbol, corresponding to the address where the inferior stopped). */ ........ insert_step_resume_breakpoint_at_frame ( get_prev_frame (get_current_frame ())); } The condition is the second code block is taken and breakpoint is indeed set. I have two questions: 1. Is "just stepped into ... function" comment accurate? I think that all cases of steppin into function are handled by the previous if (frame_id_eq (frame_unwind_id (get_current_frame ()), step_frame_id)) {} condition, and all code paths inside that condition end with return. So, the second code block is not executed when we've just stepped into a function. Is the code intended to handle only the case when we've *returned* to undebuggable function? 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? Thanks in advance, Volodya