From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13207 invoked by alias); 22 Feb 2007 16:56:04 -0000 Received: (qmail 13198 invoked by uid 22791); 22 Feb 2007 16:56:03 -0000 X-Spam-Check-By: sourceware.org Received: from web26713.mail.ukl.yahoo.com (HELO web26713.mail.ukl.yahoo.com) (217.146.177.70) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 22 Feb 2007 16:55:58 +0000 Received: (qmail 36476 invoked by uid 60001); 22 Feb 2007 16:55:56 -0000 X-YMail-OSG: d2QoRqgVM1kYIum0UQg131omV6f48YhkcolR89t421d5pApQ3r5ZfwH2JBBe.0hkN11fa0rYsA6Vqk2TJ6oI282y5see3gQZugg9gutcS29r8bJPI09kDk0JC6OvZpXiBn7NWenrhaUQ Received: from [149.117.9.28] by web26713.mail.ukl.yahoo.com via HTTP; Thu, 22 Feb 2007 16:55:55 GMT X-Mailer: YahooMailRC/368.8 YahooMailWebService/0.6.132.8 Date: Thu, 22 Feb 2007 19:26:00 -0000 From: Colin MacDonald Subject: Re: Unable to step over functions in arm-elf binary To: Daniel Jacobowitz Cc: gdb@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <76964.36169.qm@web26713.mail.ukl.yahoo.com> 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-02/txt/msg00238.txt.bz2 OK, so I have a breakpoint on a line that calls a function. When I hit the= breakpoint the backtrace shows this: #0 CPlatform::RunTestSuite (this=3D0x207ffb4) at Common/Platform.cpp:113 #1 0x01017db0 in main (argc=3D17253984, argv=3D0x0) at OtherFiles/Main.cpp= :37 This is fine so far. Line 113 of platform.cpp calls a function called vs_s= tatus. If I stepi until I first hit vs_status I get the following as the b= acktrace: #0 vs_status (pInBuf=3D0x0) at Common/PlatformIO.cpp:149 #1 0x00000000 in ?? () Doesn't look happy. If I execute another stepi then pInBuf is picked up. = Another few stepi instructions then fills in the backtrace properly: #0 vs_status (pInBuf=3D0x207ffb4 "=D4=E9\006\001\224=D9\006\001=D8V\a\001= =AC\r") at Common/PlatformIO.cpp:153 #1 0x010034f8 in CPlatform::RunTestSuite (this=3D0x207ffb4) at Common/Platform.cpp:113 #2 0x01017db0 in main (argc=3D17253984, argv=3D0x0) at OtherFiles/Main.cpp= :37 which seems fine. The code in the region of line 2401 in infrun.c: if (!frame_id_eq (get_frame_id (get_current_frame ()), step_frame_id) && frame_id_eq (frame_unwind_id (get_current_frame ()), step_frame_id= )) { should determine whether or not we have stepped into a subroutine and, if so, will go on to set a breakpoint at the caller's location in the desired way. The frame_id_eq call is returning zero, however, so I don't get the breakpoint. With frame debug on I get a pile of stuff the culminates in: { frame_id_eq (l=3D{!stack,!code,!special},r=3D{stack=3D0x207ff68,code=3D0x= 10032dc,!special}) -> 0 } which makes me think that get_current_frame is returning something unexpected. Certainly if I bypass the above test then I get a failure assertion in insert_step_resume_breakpoint_at_caller (get_current_frame ()); I've tried building with -mapcs-frame but it doesn't seem to make any diffe= rence. And that's me into guesswork now. Colin MacDonald ----- Original Message ---- From: Daniel Jacobowitz To: Colin MacDonald Cc: gdb@sourceware.org Sent: Thursday, 22 February, 2007 1:12:59 PM Subject: Re: Unable to step over functions in arm-elf binary On Thu, Feb 22, 2007 at 12:56:04PM +0000, Colin MacDonald wrote: > I'm using GDB / Insight 6.5. First attempts with 6.6 appear to show the = same behaviour. >=20 > I updated my remote serial server to support $vCont packets as well as th= e basic $c and $s packets but no joy. I recommend you single step (using stepi) to the first instruction of a function you can't "next" over, and try "backtrace". If it's wrong, that's your problem. Keep stepi'ing a bit until you're into the function body. Another thing that may be helpful is "set debug infrun 1". --=20 Daniel Jacobowitz CodeSourcery =09 =09 =09=09 ___________________________________________________________=20 New Yahoo! Mail is the ultimate force in competitive emailing. Find out mor= e at the Yahoo! Mail Championships. Plus: play games and win prizes.=20 http://uk.rd.yahoo.com/evt=3D44106/*http://mail.yahoo.net/uk