GDB has a command called 'gcore' which dumps core without terminating
the process.  I peeked at the source (gdb/gcore.c), and it pretty much
does this in a series of steps (no all-in-one system call
unfortunately).  You could theoretically include the gdb
headers/libraries and mimic what's done in gcore.c.

GDB also provides /usr/bin/gcore, a shell script that basically starts
gdb, runs gcore, and exits.

hth,
-Brad

On Wed, 2007-06-06 at 10:40 -0500, McKown, John wrote:
> > -----Original Message-----
> > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On
> > Behalf Of Mark Post
> > Sent: Wednesday, June 06, 2007 10:39 AM
> > To: [email protected]
> > Subject: Re: coredump() ???
> >
> >
> > >>> On Wed, Jun 6, 2007 at 11:08 AM, in message
> > <[EMAIL PROTECTED]
> > m>, Pat Carroll
> > <[EMAIL PROTECTED]> wrote:
> > > How about a snippet of assembler code to issue a CP DUMP
> > command via a
> > > diagnose?
> >
> > Also not portable, and worse, won't even work in an LPAR.
> >
> >
> > Mark Post
>
> And I doubt that you can use gdb to look at it. And it dumps the entire
> image, not just the current process.
>
> --
> John McKown
> Senior Systems Programmer
> HealthMarkets
> Keeping the Promise of Affordable Coverage
> Administrative Services Group
> Information Technology
>
> The information contained in this e-mail message may be privileged
> and/or confidential.  It is for intended addressee(s) only.  If you are
> not the intended recipient, you are hereby notified that any disclosure,
> reproduction, distribution or other use of this communication is
> strictly prohibited and could, in certain circumstances, be a criminal
> offense.  If you have received this e-mail in error, please notify the
> sender by reply and delete this message without copying or disclosing
> it.
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
--
Brad Hinson <[EMAIL PROTECTED]>
Technical Account Manager
Red Hat, Inc.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to