DragonFly BSD
DragonFly users List (threaded) for 2010-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: how to install profiling libs? (2)


From: Damian Weber <dweber@xxxxxxxxxxxxxxx>
Date: Fri, 28 May 2010 00:09:51 +0200 (CEST)


On Thu, 27 May 2010, Sascha Wildner wrote:

> Date: Thu, 27 May 2010 22:55:02 +0200
> From: Sascha Wildner <saw@online.de>
> To: users@crater.dragonflybsd.org
> Newsgroups: dragonfly.users
> Subject: Re: how to install profiling libs? (2)
> 
> Am 27.05.2010 22:30, schrieb Damian Weber:
> > How to install libm_p.a?
> 
> Not that this is particularly helpful, but profiled libs (afaik) are in
> /usr/lib/profile and it would be /usr/lib/profile/libm.a in this case.

I tried it and set a link to the library.

$ ls -l /usr/lib/libm_p.a
lrwxr-xr-x  1 root  wheel  23 May 27 23:48 /usr/lib/libm_p.a@ -> /usr/lib/profile/libm.a

Compile now ok, but weird result, argv=0x0 ?!
Modified source to access argv[0]:

$ cat test.c
#include <stdio.h>

int main(int argc, char **argv)
{
        puts(argv[0]);
        return 0;
}


$ g++ -g -pg -o test test.c
$ ./test
Segmentation fault: 11 (core dumped)
$ gdb test test.core
GNU gdb (GDB) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-dragonfly".
For bug reporting instructions, please see:
<http://bugs.dragonflybsd.org/>...
Reading symbols from /home/dweber/src-DragonFly-i386/misc/test...done.
Reading symbols from /usr/lib/gcc41/libstdc++.so.9...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/gcc41/libstdc++.so.9
Reading symbols from /usr/lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.7
Reading symbols from /usr/lib/libm.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libm.so.3
Reading symbols from /usr/libexec/ld-elf.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/libexec/ld-elf.so.2
Core was generated by `test'.
Program terminated with signal 11, Segmentation fault.
#0  0x08048951 in main (argc=0, argv=0x0) at test.c:5
5               puts(argv[0]);

Maybe that was the wrong way to use the profiled version of the libs.

-- Damian




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]