From: "Andy Glew" <glew@cs.wisc.edu>
To: help-gcc@gnu.org
Subject: Forcing thrown exceptions to core dump without stack unwinding?
Date: Fri, 31 Dec 1999 22:24:00 -0000 [thread overview]
Message-ID: <829qlj$80e@spool.cs.wisc.edu> (raw)
Message-ID: <19991231222400.jMXXSTQzr_MTYjojXV45xREGLKEU5hHyPZ7XXUMWMyI@z> (raw)
I'm using GCC 2.95.
Q: is there a way of forcing thrown exceptions to core dump
at the site of the exception - so that I can get a useful core dump
I can look at in a debugger?
Instead, what seems to be happening is that the exceptions cause
stack unwinding, are eventually uncaught, and cause a terminate
way up on high. For whatever reason, I can get no useful stack
backtrace when I look at the core dump in a debugger.
My program may run for many days before the core dump (or not).
It is impractical to run them in a debugger set to break at the first
exception. Since the exceptions seem to be arising in library functions
I have not written, it is impractical to change the code to optionally
not throw.
(As currently written, there is no issue distinguishing between caught
and uncaught exceptions, since I have no exception handling.
In any case, the biggest use I have for catching exceptions is to elaborate
an error message - e.g. to say "new ran out of memory"
and then add layers of context "allocating a foobar_t"
"reading the persistemt object store bar" ...
I.e. so I won't care very much, for now, if all exceptions immediately
cause a coredump without doing any stack unwiding.)
I like the concept of exceptions, but I am afraid that I have found that
program debuggability has declined significantly since I started using them.
---
Please email to glew@cs.wisc.edu
next reply other threads:[~1999-12-31 22:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-03 17:33 Andy Glew [this message]
1999-12-03 23:13 ` Mumit Khan
1999-12-31 22:24 ` Mumit Khan
1999-12-31 22:24 ` Andy Glew
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='829qlj$80e@spool.cs.wisc.edu' \
--to=glew@cs.wisc.edu \
--cc=help-gcc@gnu.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).