據this answer,它應該打印所有的函數名稱:爲什麼'-finstrument-functions`不適合我?
[[email protected] test]# cat hw.c
#include <stdio.h>
int func(void)
{
return 1;
}
int main(void)
{
func();
printf("%d",6);
return 6;
}
[[email protected] test]# gcc -Wall hw.c -o hw -finstrument-functions
[[email protected] test]# ./hw
6
[[email protected] test]# gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
Copyright (C) 2006 Free Software Foundation, Inc.
但爲什麼它不是爲我工作?
答案是錯的。 – 2011-05-30 12:37:27