Date: Thu, 25 Oct 2007 01:32:26 +0200 From: Ivan Voras <ivoras@freebsd.org> To: freebsd-current@freebsd.org Subject: Profiling on RELENG_7 (and probably HEAD)? Message-ID: <ffokmg$7p0$1@ger.gmane.org>
index | next in thread | raw e-mail
[-- Attachment #1 --]
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 <getopt.h>
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 details.
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=Cannot access memory at address 0xc
) at foo.c:5
5 getopt(argc, argv, "h");
(gdb) bt
#0 0x080481be in main (argc=Cannot 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?
[-- Attachment #2 --]
-----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-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ffokmg$7p0$1>
