From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14428 invoked by alias); 16 Nov 2005 20:20:40 -0000 Received: (qmail 14416 invoked by uid 22791); 16 Nov 2005 20:20:37 -0000 X-Spam-Check-By: sourceware.org Received: from c-24-61-23-223.hsd1.ma.comcast.net (HELO cgf.cx) (24.61.23.223) by sourceware.org (qpsmtpd/0.31-dev) with ESMTP; Wed, 16 Nov 2005 20:20:36 +0000 Received: by cgf.cx (Postfix, from userid 201) id 9018413C6C1; Wed, 16 Nov 2005 15:20:34 -0500 (EST) Date: Wed, 16 Nov 2005 20:20:00 -0000 From: Christopher Faylor To: gdb@sources.redhat.com, Ben Greear Subject: Re: Dumping core on windows? Message-ID: <20051116202033.GC19023@trixie.casa.cgf.cx> Mail-Followup-To: gdb@sources.redhat.com, Ben Greear References: <437B87D4.4060304@candelatech.com> <437B8D6B.65249253@dessent.net> <437B8F4C.8060708@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <437B8F4C.8060708@candelatech.com> User-Agent: Mutt/1.5.8i 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: 2005-11/txt/msg00325.txt.bz2 On Wed, Nov 16, 2005 at 11:58:04AM -0800, Ben Greear wrote: >Brian Dessent wrote: >>Ben Greear wrote: >>>Is there any way to configure windows to dump a core file that GDB can >>>decode? >> >>If you are using Cygwin, the dumper utility is provided for this. See >>the users guide. > >I'm using mingw on Linux to cross-compile a windows executable. It >does not require/use cygwin, but I can use cygwin if that will do what >I need. I'll investigate the dumper tool. AFAIK, the only thing that's cygwin-specific about dumper.exe is to use cygwin's "just in time" debugging facility so, although dumper.exe should be able to produce a core file that gdb will understand, I don't think there's any way to have it called automatically when a SEGV (or whatever) happens. >>>(Or, get a stack-trace some other way?) >> >>Attach to the process and "bt"? No core file is needed for that. >>Maybe you should supply some more details. > >After hours or days, my application crashes. It's not overly >convenient for me to attach gdb to the process(es), but it can be done >if that is the only way. > >Is there a way to have gdb automatically start running an app, for >instance, something like this: > >gdb --exe=foo.exe --autostart --command="--arg1 --arg2=bar" > >I know you can pipe commands in, but that's a bit inconvenient... Perhaps "gdb --help" would be of some interest to you. It reveals this option: gdb --args foo --arg1 --arg2 cgf