Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Bennett F. Dill" <bdill@linux.dillfamily.org>
To: gdb@sources.redhat.com
Subject: Re: core while attached
Date: Mon, 27 Jan 2003 20:57:00 -0000	[thread overview]
Message-ID: <20030127205815.GA10206@linux.dillfamily.org> (raw)
In-Reply-To: <20030127191930.GB11567@nevyn.them.org>

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
I'm ready to ask for a new version of gdb (5.3 is the latest i see), but
I don't see any documentation on generate-core-file anywhere...  Before
I ask for a new version, can someone verify that generate-core-file is
the correct syntax/command?  All I see is how to switch core files
etc...

TIA,
Ben


  parent reply	other threads:[~2003-01-27 20:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-27 18:31 Bennett F. Dill
2003-01-27 19:19 ` Daniel Jacobowitz
2003-01-27 19:44   ` Bennett F. Dill
2003-01-27 20:57   ` Bennett F. Dill [this message]
2003-01-27 21:02     ` Daniel Jacobowitz
2003-01-28 14:33       ` Bennett F. Dill
2003-01-28  3:51 ` Joel Brobecker
2003-01-28 14:31   ` Bennett F. Dill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030127205815.GA10206@linux.dillfamily.org \
    --to=bdill@linux.dillfamily.org \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox