|
From: Praveen K <pra...@ya...> - 2006-10-19 17:48:36
|
Hi all,=0A=0AIm trying to run valgrind on a piece of code which makes funct= ion calls from within a macro expansion. As a result, the trace looks like = this:=0A=0A=0A=0A=3D=3D5712=3D=3D at 0x401D7AA: calloc (vg_replace_mallo= c.c:279)=0A=0A=3D=3D5712=3D=3D by 0x43DAFC9: ???=0A=0A=3D=3D5712=3D=3D = by 0x43E8CDF: ???=0A=0A=3D=3D5712=3D=3D by 0x43E9C1E: ???=0A=0A=3D=3D5= 712=3D=3D by 0x43C7E62: ???=0A=0A=3D=3D5712=3D=3D by 0x43C7EDA: ???= =0A=0A=3D=3D5712=3D=3D by 0x43618EC: ???=0A=0A=3D=3D5712=3D=3D by 0x8= 05E14C: plugins_call_init (plugin.c:407)=0A=0A=3D=3D5712=3D=3D by 0x804D= 2BB: main (server.c:806)=0A=0AHow can I see what function is exactly being = called, and/or how can I get a complete trace.=0A=0AThanks,=0APraveen=0A=0A= ----=0AI'll be more enthusiastic about encouraging thinking outside the box= when there's evidence of any thinking going on inside it.=0A=0A - Terry P= ratchett=0A=0A=0A=0A=0A=0A=0A |
|
From: Tom H. <to...@co...> - 2006-10-19 21:11:14
|
In message <200...@we...>
Praveen K <pra...@ya...> wrote:
> Im trying to run valgrind on a piece of code which makes function calls
> from within a macro expansion. As a result, the trace looks like this:
>
> ==5712== at 0x401D7AA: calloc (vg_replace_malloc.c:279)
> ==5712== by 0x43DAFC9: ???
> ==5712== by 0x43E8CDF: ???
> ==5712== by 0x43E9C1E: ???
> ==5712== by 0x43C7E62: ???
> ==5712== by 0x43C7EDA: ???
> ==5712== by 0x43618EC: ???
> ==5712== by 0x805E14C: plugins_call_init (plugin.c:407)
> ==5712== by 0x804D2BB: main (server.c:806)
>
> How can I see what function is exactly being called, and/or how can I get a
> complete trace.
I'm not sure what macro expansions have to do with anything - the
reason you're getting the ??? in the trace is that there is no
symbol information available.
Given the name of the functions we can see I'm guessing that you
are calling a dynamically loaded plugin that is getting unloaded
which means that there is no symbol table available when valgrind
comes to print the report (this is a memory leak I assume?).
I would advise tweaking your program to not unload plugins on
exit when running under valgrind.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|