|
From: Kirpa, V. <vk...@bo...> - 2005-11-25 10:53:50
|
=20 Hi all =20 If object file in library (ar file), line number not present in valgrid's comment line =20 for example: sonetMain included in ar file =20 =3D=3D7481=3D=3D Invalid read of size 1 =3D=3D7481=3D=3D at 0x402D39A7: _IO_fclose@@GLIBC_2.1 (in = /lib/libc.so.6) =3D=3D7481=3D=3D by 0x805C4B1: sonetMain (in /leis/build/R22.0/plan/bin/fibermod) =20 =3D=3D7481=3D=3D by 0x804A86E: main (fts_main.c:555) =3D=3D7481=3D=3D by 0x402969B1: __libc_start_main (in /lib/libc.so.6) =20 Best regards Vladimir Kirpa C/C++ Developer =20 =20 <http://promos.hotbar.com/promos/promodll.dll?RunPromo&El=3D&SG=3D&RAND=3D= 8648 9&partner=3Dhbtools> Upgrade Your Email - Click here!=20 |
|
From: Tom H. <to...@co...> - 2005-11-25 11:14:14
|
In message <1B75AFA515B9C6469DAD7EF773CD7CEC4AD65A@MAIL.bonustec.com>
Volodymyr Kirpa <vk...@bo...> wrote:
> If object file in library (ar file), line number not present in
> valgrid's comment line
An object file can't be in an ar file when you are running a program
under valgrind - it will have to have been linked into either a
program or a shared object and the fact that it came from an ar
file originally is irrelevant.
> for example: sonetMain included in ar file
>
> ==7481== Invalid read of size 1
> ==7481== at 0x402D39A7: _IO_fclose@@GLIBC_2.1 (in /lib/libc.so.6)
> ==7481== by 0x805C4B1: sonetMain (in /leis/build/R22.0/plan/bin/fibermod)
> ==7481== by 0x804A86E: main (fts_main.c:555)
> ==7481== by 0x402969B1: __libc_start_main (in /lib/libc.so.6)
That looks like you didn't compile that object file with debug before
you put it in the ar library. Either that or you stripped it at some
point (or stripped the program after linking it).
You need to use objdump/elfread or something similar to investigate
whether your program has debug information or not and whether or not
the object file in the library has that information.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|