delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/28/19:33:14

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: <5.1.0.14.2.20020328161017.0274f2c8@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Thu, 28 Mar 2002 16:32:36 -0800
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: stacktrace from withn an exec upon error condition
In-Reply-To: <20020328230518.GM16757@redhat.com>
References: <a807fm$5fd$1 AT main DOT gmane DOT org>
<a7v9eh$1ph$1 AT main DOT gmane DOT org>
<20020328153930 DOT GF11781 AT redhat DOT com>
<a7vgnr$b9q$1 AT main DOT gmane DOT org>
<20020328221751 DOT GK16757 AT redhat DOT com>
<a807fm$5fd$1 AT main DOT gmane DOT org>
Mime-Version: 1.0

Chris,

If you're going to take the time to respond, the least you could do is give 
a useful answer.


Since unlike Chris, I do not know the answer, I'll illustrate how I 
discovered it.


Hans is correct that there is no prototype for this function in any file 
under /usr/include, though there is a mention of it:

% cd /usr/include
% egrep cygwin_stackdump $(find -type f)
./cygwin/version.h:       16: Export cygwin_stackdump

Upon examination, it is seen that this is in a long comment listing 
API_MINOR changes.


Hans, if you're not aware of it, you should learn about the "nm" command 
which dumps the symbol table of an object file or library. In circumstances 
like this, I usually write a shell loop to examine all the libraries in 
/usr/lib, applying nm to each and piping the output through egrep. Egrep's 
-q option helps:

cd /usr/lib
for libName in *.a; do
         nm $libName | (egrep -s cygwin_stackdump && echo $libName)
done

Doing this shows me that cygwin_stackdump is present in libc.a, libcygwin.a 
and libg.a. An "ls -l" on these shows that libg.a is a symlink to libc.a. I 
don't know what libcygwin.a is for, but it's about 100K bigger than libc.a.

Assuming you're linking with libc.a, you should be able to just call the 
function (that is, if you  compile with gcc options that don't demand 
function prototypes). If you need the prototype, then I'd take it from 
Chris' first answer on this topic that the default prototype for this 
function would work. Namely: "extern int cygwin_stackdump(void)".

Good luck.

Randall Schulz
Mountain View, CA USA


At 15:05 2002-03-28, Christopher Faylor wrote:
>On Thu, Mar 28, 2002 at 03:13:15PM -0800, Hans Horn wrote:
> >I'm afraid not, as I do not know what files to #include so the runtime will
> >find cygwin_stackdump().
>
>I guess you're out of luck then.
>
>cgf


--
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