From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29175 invoked by alias); 2 Feb 2006 03:20:36 -0000 Received: (qmail 29165 invoked by uid 22791); 2 Feb 2006 03:20:35 -0000 X-Spam-Check-By: sourceware.org Received: from mailsrv1.tranzpeer.net (HELO mailsrv1.tranzpeer.net) (202.180.66.207) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 02 Feb 2006 03:20:33 +0000 Received: from wmsrv2.tranzpeer.net ([202.180.66.2] helo=localhost) by mailsrv1.tranzpeer.net with ESMTP (Exim 4.34) id 1F4V1K-0005hR-3t; Thu, 02 Feb 2006 16:20:30 +1300 Received: from external.hosting.co.nz (external.hosting.co.nz [203.97.46.10]) by webmail.slingshot.co.nz (Horde) with HTTP for ; Thu, 2 Feb 2006 16:20:30 +1300 Message-ID: <20060202162030.wkcswswwo08wsosc@webmail.slingshot.co.nz> Date: Thu, 02 Feb 2006 03:20:00 -0000 From: Paul Blacquiere To: Daniel Jacobowitz Cc: "gdb@sourceware.org" Subject: Re: Howto single step from beginning References: <20060202140831.wco48wcskkccsokk@webmail.slingshot.co.nz> <20060202012556.GA19090@nevyn.them.org> <20060202155252.k84sosswgkwkwsg4@webmail.slingshot.co.nz> <20060202025704.GA21125@nevyn.them.org> In-Reply-To: <20060202025704.GA21125@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.0-cvs X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00007.txt.bz2 > First, assuming that this is a dynamically linked application, try > "set stop-on-solib-events 1". That'll stop you way back in the dynamic > linker. From there you may be able to single-step to _start; it gets > called from something like _dl_start_user. pretty sure it is static gcc -g --static -o test test.c result as follows: ------------------------------- (gdb) set stop-on-solib-events 1 (gdb) run Starting program: /home/blacq/src/bin/test Program received signal SIGILL, Illegal instruction. 0x00008094 in _start () (gdb) ------------------------------ > > Secondly, does it work outside of GDB? Yup, sorry forgot to mention earlier. > If so, I'd suspect that the > breakpoint GDB has invisibly placed at _start (which it always does) > is causing SIGILL instead of SIGTRAP. There was some change in this > area for ARM/Linux recently. If your kernel is too old, perhaps > GDB is using a breakpoint that it doesn't support. Or maybe it's GDB > that's too old. Check with "set debug target 1" before running to see > what bytes it's inserting, then check your kernel sources (esp. > arm/kernel/ptrace.c and arm/kernel/traps.c) to see which breakpoints > it expects. > Your description seems very feasible, as I am using Linux kernel 2.6.12. I will investigate this further. PaulB.