From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1985 invoked by alias); 27 Jan 2003 19:44:53 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 1977 invoked from network); 27 Jan 2003 19:44:52 -0000 Received: from unknown (HELO linux) (24.209.209.134) by 172.16.49.205 with SMTP; 27 Jan 2003 19:44:52 -0000 Received: from bdill by linux with local (Exim 3.35 #1 (Debian)) id 18dFCh-0002ah-00 for ; Mon, 27 Jan 2003 14:45:59 -0500 Date: Mon, 27 Jan 2003 19:44:00 -0000 To: gdb@sources.redhat.com Subject: Re: core while attached Message-ID: <20030127194559.GA9935@linux.dillfamily.org> References: <20030127183252.GA9690@linux.dillfamily.org> <20030127191930.GB11567@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030127191930.GB11567@nevyn.them.org> User-Agent: Mutt/1.3.28i From: "Bennett F. Dill" X-SW-Source: 2003-01/txt/msg00442.txt.bz2 On Mon, Jan 27, 2003 at 02:19:30PM -0500, Daniel Jacobowitz wrote: > On Mon, Jan 27, 2003 at 01:32:52PM -0500, Bennett F. Dill wrote: > > I hope that someone out there has the patience to look at my problem :-) > > > > Hi, I'm working with gdb and I have the -g option on my application. > > Typically I get very descriptive error messages. This latest problem > > however is really interesting though... It seems to be a problem with > > libc.so.1... > > > > [history] > > Anyway, the application runs in the background and is a server to about > > 25 clients concurrently. It takes a few hours for the app to sigsegv. > > Now, it never dumped a core for some reason, so i just attach gdb to the > > process and continue and wait for the error to rear its head. Now, > > since the app serves ~25 people, I don't really have time to look around > > with the debugger... (I'm new to gdb, noo suprise I'm sure) > > [/history] > > > > So my question is, is it possible to have the gdb that is attached to a > > running process that has hit a signal sigsegv, to dump a core? This > > way I can leisurly mull over the data. > > You're in luck. Grab a recent version of GDB and use the > "generate-core-file" command. > > > More questions I have (totally n00bishness I'm sure), is how can I > > find out what line of code in my app, called the 'deadly' function in > > libc.so.1 (fprintf) and is there any way to view the call to fprintf > > based on the memory address? > > > > Below is what I get from a where or a BT etc... If I try to use a > > 'return' I go no where real fast. > > > > TIA for your assistance :-) > > Ben > > > > > > > > Program received signal SIGSEGV, Segmentation fault. > > 0xff30ceb8 in _getorientation () from /usr/lib/libc.so.1 > > (gdb) where > > #0 0xff30ceb8 in _getorientation () from /usr/lib/libc.so.1 > > #1 0xff30d0dc in _set_orientation_byte () from /usr/lib/libc.so.1 > > #2 0xff300710 in fprintf () from /usr/lib/libc.so.1 > > #3 0x3aa80 in ?? () > > #4 0x30420 in ?? () > > #5 0x2f6f0 in ?? () > > #6 0x2c7c8 in ?? () > > #7 0x2c258 in ?? () > > (gdb) > > That really looks like you're missing debug info; I don't know if those > are legitimate code addresses on your platform or not. > > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer Well... libc.so.1 (i think) isn't compiled with debug info in it. So that's why that's missing (i think)... Usually, I see the code, the values, and the code line number, and what file the code is in... I guess i could try to get some sa to recompile libc.so.1 with debugging info in it, but im not going to hold my breath.