Mail Archives: cygwin/2002/03/29/08:49:50
Hi Hans,
I sometimes manually lookup like:
$ gdb foo.exe
l *0xdeadbeef
Bye, Heribert (heribert_dahms AT icon-scm DOT com)
-----Original Message-----
From: Christopher Faylor [mailto:cgf AT redhat DOT com]
Sent: Freitag, 29. März 2002 05:06
To: cygwin AT cygwin DOT com
Subject: Re: stacktrace from withn an exec upon error condition
On Thu, Mar 28, 2002 at 07:40:03PM -0800, Hans Horn wrote:
>I just tried Chris' little test and got: something like this:
Wow, hens' teeth prevail.
>This however, is of little help (at least not to me).
>
>What I had in mind, though, was to get a list of the function names
>(demangled of course) that were in the calling chain to where the error
>occured. In human readable form to be useful. Sorry if I hadn't made
>clear enough what I was looking for!
>
>I do get this nice feature on AIX and, of course, par excellance with
>Java.
>
>Does anybody have any experience with Win32 API's StackWalk() as Larry
>had suggeted in an earlier response to my original posting? Perhaps
>with some examples?
The above actually uses StackWalk to traverse the stack. StackWalk
doesn't give you symbol names. However, if you really are stuck on
the idea, google should give you all sorts of info.
FYI, getting the symbol names will be extremely non-trivial.
You could possibly post-filter the output with a shell script and
the addr2line function. 'info binutils' will give you the (gasp!)
documentation for addr2line. A google search will also unearth
addr2line documentation.
If you really want to do this programatically, you could use functions
in the bfd library to decode your symbols. I'm not aware of any
cookbook or simple documentation for bfd, though. However, the bfd
library is part of the cygwin release. There is info documentation
available and a google search will also uncover it on the web.
For the record, I don't know anything about what is required to
interface with bfd. I'm offering this information so that Robert
Schulz won't accuse me of being unhelpful if I'm silent when you
have questions.
cgf
(the fish teacher)
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -