From owner-freebsd-current@FreeBSD.ORG Wed Oct 24 23:33:15 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F03D816A419 for ; Wed, 24 Oct 2007 23:33:15 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 795AB13C4B5 for ; Wed, 24 Oct 2007 23:33:15 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IkpiT-0006Fo-Vo for freebsd-current@freebsd.org; Wed, 24 Oct 2007 23:32:49 +0000 Received: from 78-0-91-182.adsl.net.t-com.hr ([78.0.91.182]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Oct 2007 23:32:49 +0000 Received: from ivoras by 78-0-91-182.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Oct 2007 23:32:49 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Ivan Voras Date: Thu, 25 Oct 2007 01:32:26 +0200 Lines: 66 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigAD7B571F21B9041C5BBF1D96" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 78-0-91-182.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) X-Enigmail-Version: 0.95.4 Sender: news Subject: Profiling on RELENG_7 (and probably HEAD)? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2007 23:33:16 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigAD7B571F21B9041C5BBF1D96 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I tried to profile an applications but there's a problem - the application crashes in getopt(). I've constructed a simple test case that demonstrates this: --- foo.c -- #include int main(int argc, char **argv) { getopt(argc, argv, "h"); return 0; } ------------ > gcc -pg -g -o foo foo.c > ./foo Segmentation fault (core dumped) > gdb ./foo foo.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you = are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for detail= s. This GDB was configured as "i386-marcel-freebsd"... Core was generated by `foo'. Program terminated with signal 11, Segmentation fault. #0 0x080481be in main (argc=3DCannot access memory at address 0xc ) at foo.c:5 5 getopt(argc, argv, "h"); (gdb) bt #0 0x080481be in main (argc=3DCannot access memory at address 0xc ) at foo.c:5 > ldd ./foo ldd: ./bla: not a dynamic executable The same test case works on a 6.x machine. Am I missing something or is profiling broken? --------------enigAD7B571F21B9041C5BBF1D96 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHH9YQldnAQVacBcgRAiMxAKDC6F7B4NozxC34S4w1k4/3ogNzigCfeBDJ gHldtVBbr66GwRxRab9K5C4= =hXr7 -----END PGP SIGNATURE----- --------------enigAD7B571F21B9041C5BBF1D96--