| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; q=dns; s= | |
| default; b=oJiUcsKvoig6sfx+jBJpdv8xzVBhpGXnYSrruNYcniVX4LOkMeol4 | |
| mg1fre6qdYqsO0Tf7zbXFZrAoadhcpJcIpHPncxkqx2BqsvHYeXxU24X/3u/U6uq | |
| xenXAMbkGNlguDihYoxBcpGlqMQRaM3UCZVLpXj9tg7yqJFdAQNB9Y= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:date:from:to:subject:message-id:reply-to | |
| :references:mime-version:content-type:in-reply-to; s=default; | |
| bh=DLGo2QZeSQyZ3zngcAQ8qjAmkeQ=; b=ssmP6qp2Z/d06aNAnddB4MmZ5ybS | |
| fj3uduJjTExNO3JcCl8tHtmo0dRjRwL0mC2XVJispXQcFkmhzPIQUdIF9yJ4jhd1 | |
| ryGv6uQjUYLfcU+KhNskwYUA2SMaGtWcxfRcx099jLQMYCZ7TqFrY6xirjuzj4A2 | |
| AaOi5ZizWJL1OYI= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 |
| X-HELO: | calimero.vinschen.de |
| Date: | Mon, 30 Mar 2015 12:55:29 +0200 |
| From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: static vs. shared linking |
| Message-ID: | <20150330105529.GJ29875@calimero.vinschen.de> |
| Reply-To: | cygwin AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <5510A9AB DOT 7020607 AT tiscali DOT co DOT uk> <5511AF73 DOT 9070607 AT tiscali DOT co DOT uk> <20150325090453 DOT GB3017 AT calimero DOT vinschen DOT de> <551339E4 DOT 60705 AT tiscali DOT co DOT uk> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <551339E4.60705@tiscali.co.uk> |
| User-Agent: | Mutt/1.5.23 (2014-03-12) |
--phCU5ROyZO6kBE05
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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 t=
his
> >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
>=20
> 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.
>=20
> 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.s=
h'
> again. This generates a fresh stackdump file, and then I do:
>=20
> awk '/^[0-9]/{print $2}' shared_test.exe.stackdump | addr2line -f -e
> shared_test.exe
>=20
> 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
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--phCU5ROyZO6kBE05
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBAgAGBQJVGSuhAAoJEPU2Bp2uRE+gF78P/0Ok77GTWTVECmYu55aZQQvZ
e+QSEutFbr7F62ZIHIWPBJn9GsmVm6LUPxyV4lq26H9aFqSYNbcY4s8pLfL8TPLq
dQejOYUBwg6D1z8nEIVJD49kPl8IEraCx3ZY8bp8uss63R9NTVUpgCMgpk7jR7nD
SiJHu7WV/a7KoC6UlP8U3W8z2IqG0qsEh/gMUbxpVVnWKwQujN+SMSpvLQtuKPSA
QqZsflrxg+3rYPXLSWoQ/dBavHJdZ9PyCFVnk5SDjSWfVu3iPdD+KdXmTNfn7iRg
8iFdDwhPpN3ytPJGCe5ofmQ5iKaE71/7XcT8vwBOUUI2QatB0fclLTlVStOa24Y5
KTfYPfRZhURDpZDknw0NG5finBkwyuuA8FE5rihc0aFND318FRVooucr2Copfzlq
YKX60L4ztBtHa7xr79Lx1yZhNIIOpsY/ryXM7aavBegn3T3JJi7D85wD3t9vaqRH
2J/83iLWyQwvoB2uIENG+u4D6/eOYDG7I+YC6eO1OG6DdPYP6SzQsEqcNC7doRRJ
4ZDSZQ08Bq33TcBuZ1g2TFNBx61CcDtQZWxARW+gfraHXk6uO712nsMAXvk8FfDE
Cb4xN0C6jEmFcAC26P0OEw8oiTneuG6lzRWXNLTkiWQvlKlCq+EqqtOmTNlS28rL
XR0RP1yb9mGc2wtlI+7r
=v8rU
-----END PGP SIGNATURE-----
--phCU5ROyZO6kBE05--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |