From owner-freebsd-hackers Tue Feb 16 13:21:25 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id 629C710E8A; Tue, 16 Feb 1999 13:21:21 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by herring.nlsystems.com (8.9.2/8.8.8) with ESMTP id VAA59483; Tue, 16 Feb 1999 21:20:50 GMT (envelope-from dfr@nlsystems.com) Date: Tue, 16 Feb 1999 21:20:49 +0000 (GMT) From: Doug Rabson To: Eivind Eklund Cc: hackers@freebsd.org Subject: Re: gdb sucks - and I need to get around it. help? In-Reply-To: <19990216170310.C60651@bitbox.follo.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 16 Feb 1999, Eivind Eklund wrote: > Anybody know of any way of getting gdb to step from the start of the > program? > > I have an executable with absolutely no symbol data (symbol data is > absolutely non-available) which I *have* to get to step through, if > necessary by re-implementing gdb. > > Eivind. I have had pretty good luck debugging things right from the first line of _rtld(). The trick is to run the program first and stop it (or let it fault if that is what is happening). Then you can set a breakpoint anywhere (before main, inside rtld or whatever) and it *should* hit the breakpoint the next time you run it. If it faults very early, gdb might not load rtld's symbol table but that can be solved with some careful use of add-symbol-file (it doesn't sound like you care about rtld though...) -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message