From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: static vs. shared linking
Date: Mon, 30 Mar 2015 11:04:00 -0000 [thread overview]
Message-ID: <20150330105529.GJ29875@calimero.vinschen.de> (raw)
In-Reply-To: <551339E4.60705@tiscali.co.uk>
[-- Attachment #1: Type: text/plain, Size: 2309 bytes --]
On Mar 25 22:42, David Stacey wrote:
> On 25/03/2015 09:04, Corinna Vinschen wrote:
> > If you
> >install the cygwin-debuginfo package, addr2line returns something like this
> >as the call stack (non-required path components removed):
> >
> >[...]/cygwin/exceptions.cc:1247
> >[...]/cygwin/exceptions.cc:1501
> >[...]/cygwin/sigproc.cc:717
> >[...]/cygwin/signal.cc:252
> >[...]/cygwin/signal.cc:303
> >[...]/cygwin/signal.cc:313
> >[...]/cygwin/signal.cc:289
> >[...]/cygwin/signal.cc:375
>
> Thank you for your comments - they were really helpful. Yes, I should have
> specified '-g' on the command line - that was an omission on my part -
> sorry.
>
> I've never had much joy out of addr2line before, and I'm struggling to
> recreate what you've done. I've added '-g' to the command line, run 'go.sh'
> again. This generates a fresh stackdump file, and then I do:
>
> awk '/^[0-9]/{print $2}' shared_test.exe.stackdump | addr2line -f -e
> shared_test.exe
>
> but I just see question marks. Please could you show the exact lines you're
> using.
addr2line is a bit dumb and needs help. What I do is to cat the
stackdump file and look at the addresses. They usually show where
the stuff comes from:
$ gawk '/^0/{print $2}' mkgroup.exe.stackdump
7FFBDC82DDB6
001800FEC36
001800FE188
001800CF471
001800CF53D
0018007EAC1
00100402DE6
00180049411
00180046369
00180046180
00180049488
00100401351
00100401010
7FFBD9FE13D2
7FFBDC85EB64
The 7f addresses are from OS DLLs you can't read with addr2line.
0018xxx is the Cygwin DLL, 0010xxx is the application itself. Other
addresses are other DLLs. Just check the addresses against
/etc/rebase.db.x86_64.
Then call addr2line for each object file, e.g.:
$ addr2line -e /usr/bin/cygwin1.dll 001800FEC36 001800FE188 001800CF471
[...]/cygwin/passwd.cc:576
[...]/cygwin/passwd.cc:353
[...]/cygwin/grp.cc:413
$ addr2line -e /usr/bin/mkgroup.exe 00100401351 00100401010
/usr/src/debug/cygwin-1.7.35-1/winsup/cygwin/lib/cygwin_crt0.c:22
/usr/src/debug/cygwin-1.7.35-1/winsup/cygwin/crt0.c:34
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-03-30 10:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 8:07 David Stacey
2015-03-24 18:50 ` David Stacey
2015-03-25 9:17 ` Corinna Vinschen
2015-03-25 17:10 ` Warren Young
2015-03-25 22:42 ` David Stacey
2015-03-25 23:28 ` David Stacey
2015-03-25 22:48 ` David Stacey
2015-03-30 11:04 ` Corinna Vinschen [this message]
2015-03-30 19:17 ` David Stacey
2015-03-30 23:02 ` Andrey Repin
2015-03-31 0:50 ` David Stacey
2015-03-31 3:26 ` Andrey Repin
2015-03-31 9:05 ` Achim Gratz
2015-03-31 10:04 ` Corinna Vinschen
2015-03-31 9:07 ` Corinna Vinschen
2015-03-31 18:00 ` David Stacey
2015-04-09 8:15 ` David Stacey
2015-04-09 17:24 ` Corinna Vinschen
2015-04-11 18:51 ` David Stacey
2015-04-09 21:32 ` Larry Hall (Cygwin)
2015-04-11 19:21 ` David Stacey
2015-03-25 23:29 ` David Stacey
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=20150330105529.GJ29875@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/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).