linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Rechberger <mrechberger@gmail.com>
To: r_zaca <r_zaca@ig.com.br>, linux-c-programming@vger.kernel.org
Subject: Re: Program execution
Date: Tue, 16 Aug 2005 16:48:34 +0200	[thread overview]
Message-ID: <d9def9db0508160748102e34ed@mail.gmail.com> (raw)
In-Reply-To: <20050816_143050_024141.r_zaca@ig.com.br>

Hello,

first enable coredumps
# ulimit -c unlimited
# ./yourfaultyapp

open another shell and kill the process using kill -SIGSEGV then it
should say core dumped (also compile your application with -g .. there
are a few other debugging options but that one might already help you)

afterwards run your application with gdb (should look like the following line)

# gdb ./yourfaultyapp coredumpfile
> bt // for a backtrace, last functions which got called and so
> frame #<framenumber> // inspect a frame
> list // show the sourcecode which is connected to that frame

hope this helps,
Markus

On 8/16/05, r_zaca <r_zaca@ig.com.br> wrote:
>   Hello all,
> 
>   I have a program that just stops execution and I can't see what is really
> going on. Does anyone know how this kind of problem shoud be solved. I've
> already read something about core dump memory, but I don't know how to make
> it, or instruct my program to do that. Can anyone help me?
> 
> p.s.) My program runs on a Linux machine.
> 
>   Thanks.
> 
> 


-- 
Markus Rechberger

http://www.wikiservice.at/dse/wiki.cgi?MarkusRechberger

  reply	other threads:[~2005-08-16 14:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-16 14:30 Program execution r_zaca
2005-08-16 14:48 ` Markus Rechberger [this message]
2005-08-16 15:16 ` Steve Graegert

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=d9def9db0508160748102e34ed@mail.gmail.com \
    --to=mrechberger@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=r_zaca@ig.com.br \
    /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;
as well as URLs for NNTP newsgroup(s).