From owner-freebsd-questions Thu Feb 27 14:58: 7 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDBEF37B401 for ; Thu, 27 Feb 2003 14:58:05 -0800 (PST) Received: from chen.org.nz (chen.org.nz [210.54.19.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id B470443FA3 for ; Thu, 27 Feb 2003 14:58:04 -0800 (PST) (envelope-from jonc@chen.org.nz) Received: from grimoire.chen.org.nz (localhost [127.0.0.1]) by chen.org.nz (8.12.7/8.12.7) with ESMTP id h1RMw0qR051368; Fri, 28 Feb 2003 11:58:02 +1300 (NZDT) (envelope-from jonc@grimoire.chen.org.nz) Received: (from jonc@localhost) by grimoire.chen.org.nz (8.12.7/8.12.7/Submit) id h1RMw0Ao051367; Fri, 28 Feb 2003 11:58:00 +1300 (NZDT) Date: Fri, 28 Feb 2003 11:58:00 +1300 From: Jonathan Chen To: Brian Henning Cc: freebsd Subject: Re: gdb Message-ID: <20030227225800.GA51331@grimoire.chen.org.nz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Feb 27, 2003 at 04:07:44PM -0600, Brian Henning wrote: > Hello- > i am trying to get familiar with gdb so i wrote this code knowing that i will > get a core dump. > when i try to run the following command i get some error about not being in the > proper format. > what can i do to remedy the problem? > thanks, > brian > > >gcc -ggdb gen_core.c > >./a.out > >gdb core > "/home/henninb/core": not in executable format: File format not recognized That should be: gcc -g gen_core.c ./a.out gdb a.out a.out.core -- Jonathan Chen ---------------------------------------------------------------------- Experience is a hard teacher because she gives the test first, the lesson afterwards To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message