delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/29/08:49:50

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <BF35D9C143BCCC4EB63181B67C9320C83A9BAA@serv-075.icon-germany.local>
From: Heribert Dahms <heribert_dahms AT icon-scm DOT com>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: RE: stacktrace from withn an exec upon error condition
Date: Fri, 29 Mar 2002 14:54:27 +0100
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g2TDnno09583

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019