From: David Carlton <david.carlton@sun.com>
To: Michael Snyder <Michael.Snyder@palmsource.com>
Cc: Ashwin Bharambe <ashwinb@gmail.com>, gdb@sourceware.org
Subject: Re: Programmatic access to stack traces in C or C++ programs
Date: Fri, 20 Oct 2006 21:47:00 -0000 [thread overview]
Message-ID: <yf2wt6umzhq.fsf@vnc01.sfbay.sun.com> (raw)
In-Reply-To: <1161373317.9942.113.camel@localhost.localdomain> (Michael Snyder's message of "Fri, 20 Oct 2006 12:41:57 -0700")
On Fri, 20 Oct 2006 12:41:57 -0700, Michael Snyder <Michael.Snyder@palmsource.com> said:
> On Thu, 2006-10-19 at 22:27 -0400, Ashwin Bharambe wrote:
>> I wanted to create a "stacktrace library" which would provide a
>> routine to obtain the stacktrace of the program from any point
>> _programmatically_ (like Java's stacktraces, for example..)
...
> I think that's pretty hopeless. But why don't you do it the easy way?
> Just launch your program under gdb from the start, then use gdb
> to put breakpoints at all the functions you are interested in.
I've had the same wish as Ashwin. The reason why I want it is for
unit testing - jUnit prints out a backtrace when an assertion fails,
and I sometimes want that functionality when running C++ unit tests.
And I'm not about to run GDB every single time that I run a unit test.
libunwind sounds like it might be what I'm looking for, though.
David Carlton
david.carlton@sun.com
prev parent reply other threads:[~2006-10-20 21:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-20 2:27 Ashwin Bharambe
2006-10-20 3:10 ` Neo Jia
2006-10-20 3:13 ` Daniel Jacobowitz
2006-10-20 12:41 ` Ashwin Bharambe
2006-10-20 14:27 ` Daniel Jacobowitz
2006-10-20 20:18 ` Michael Snyder
2006-10-20 21:47 ` David Carlton [this message]
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=yf2wt6umzhq.fsf@vnc01.sfbay.sun.com \
--to=david.carlton@sun.com \
--cc=Michael.Snyder@palmsource.com \
--cc=ashwinb@gmail.com \
--cc=gdb@sourceware.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