【发布时间】:2011-09-04 19:10:56
【问题描述】:
根据this answer,它应该打印所有函数名:
[root@ test]# cat hw.c
#include <stdio.h>
int func(void)
{
return 1;
}
int main(void)
{
func();
printf("%d",6);
return 6;
}
[root@ test]# gcc -Wall hw.c -o hw -finstrument-functions
[root@ test]# ./hw
6
[root@ test]# gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
Copyright (C) 2006 Free Software Foundation, Inc.
但为什么它对我不起作用?
【问题讨论】:
标签: gcc