|
From: Nicholas N. <nj...@ca...> - 2004-08-01 20:37:37
|
Hi, VALGRIND_INTERNAL_PRINTF() is *defined* in coregrind/vg_include.h. Any reason why? Surely this should not be defined in a .h file? Thanks. N |
|
From: Robert W. <rj...@du...> - 2004-08-03 02:25:47
|
> VALGRIND_INTERNAL_PRINTF() is *defined* in coregrind/vg_include.h. Any=20 > reason why? Surely this should not be defined in a .h file? I'm open to suggestions for other ways to do this - I certainly couldn't think of any way of passing varargs stuff around. Regards, Robert. --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |
|
From: Nicholas N. <nj...@ca...> - 2004-08-03 09:44:47
|
On Mon, 2 Aug 2004, Robert Walsh wrote: >> VALGRIND_INTERNAL_PRINTF() is *defined* in coregrind/vg_include.h. Any >> reason why? Surely this should not be defined in a .h file? > > I'm open to suggestions for other ways to do this - I certainly couldn't > think of any way of passing varargs stuff around. I'm confused... I just tried moving the definition of both VALGRIND_INTENAL_PRINTF and VALGRIND_INTERNAL_PRINTF_BACKTRACE into vg_messages.c, leaving the declaration in vg_include.h, and it worked fine -- I tested them with --trace-malloc=yes and by calling pvalloc() from a program (which causes an abort with backtrace). Am I missing something? Why does it need the ((weak)) attribute? Thanks. N |
|
From: Robert W. <rj...@du...> - 2004-08-03 17:01:51
|
> I'm confused... I just tried moving the definition of both=20 > VALGRIND_INTENAL_PRINTF and VALGRIND_INTERNAL_PRINTF_BACKTRACE into=20 > vg_messages.c, leaving the declaration in vg_include.h, and it worked fin= e=20 > -- I tested them with --trace-malloc=3Dyes and by calling pvalloc() from = a=20 > program (which causes an abort with backtrace). >=20 > Am I missing something? Actually, no you're not. The INTERNAL variants are different from the regular ones - they're not going to be called by a user program, so that should be fine. > Why does it need the ((weak)) attribute? Well, it doesn't any more. It needed it before to avoid complaints about multiple definitions. Regards, Robert. --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |
|
From: Nicholas N. <nj...@ca...> - 2004-08-03 17:12:42
|
On Tue, 3 Aug 2004, Robert Walsh wrote: >> I'm confused... I just tried moving the definition of both >> VALGRIND_INTENAL_PRINTF and VALGRIND_INTERNAL_PRINTF_BACKTRACE into >> vg_messages.c, leaving the declaration in vg_include.h, and it worked fine >> -- I tested them with --trace-malloc=yes and by calling pvalloc() from a >> program (which causes an abort with backtrace). >> >> Am I missing something? > > Actually, no you're not. The INTERNAL variants are different from the > regular ones - they're not going to be called by a user program, so that > should be fine. > >> Why does it need the ((weak)) attribute? > > Well, it doesn't any more. It needed it before to avoid complaints > about multiple definitions. Cool, I'll fix it. Thanks. N |