From owner-freebsd-hackers Tue Feb 16 19:19:29 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from picnic.mat.net (b133.mat.net [206.246.122.133]) by hub.freebsd.org (Postfix) with ESMTP id CA17311044; Tue, 16 Feb 1999 19:18:45 -0800 (PST) (envelope-from chuckr@mat.net) Received: from localhost (chuckr@localhost) by picnic.mat.net (8.9.3/8.8.5) with ESMTP id WAA02051; Tue, 16 Feb 1999 22:17:22 -0500 (EST) Date: Tue, 16 Feb 1999 22:17:22 -0500 (EST) From: Chuck Robey To: Greg Lehey Cc: Eivind Eklund , hackers@FreeBSD.ORG Subject: Re: gdb sucks - and I need to get around it. help? In-Reply-To: <19990217132952.Z515@lemis.com> 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 Wed, 17 Feb 1999, Greg Lehey wrote: > There's stuff before main in C programs as well. I thought the stuff before main() in C programs was strictly dealing with shared loading (crt0.o stuff only), and only C++ programs had actual code (global constructors) to execute. I don't regard the loading stuff as part of a user's program, unless you're kernel hacking, because it is not in any way modified by any user source. Is this really incorrect? The entry point of > all C and C++ programs is start, which is in crt0.o or crt1.o. In > a.out files, it used to be directly after the header at 0x1020. I'm > not sure where the start address is in an ELF file. The clue should > be here somewhere, but I can't see it: ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@glue.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run picnic (FreeBSD-current) (301) 220-2114 | and jaunt (Solaris7). ----------------------------+----------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message