我以前用gcc -fdump-rtl-expand和-finstrument-functions做函数调用跟踪,armcc有类似的功能吗?
对于gcc,我使用:
CFLAGS += -finstrument-functions -fdump-rtl-expandarmcc有类似的编译器选项吗?我试过同样的方法,但它们似乎不起作用:
$ armcc -finstrument-functions test.c
Fatal error: C3900U: Unrecognized option '-finstrument-functions'.
$ armcc -fdump-rtl-expand test.c
Fatal error: C3900U: Unrecognized option '-fdump-rtl-expand'.发布于 2012-09-24 09:49:58
似乎允许使用gcc风格的armcc工具的选项是不同的。
以下是ARM编译器工具链的摘录:编译器引用(如果您在他们的网站上“注册”,可以访问http://infocenter.arm.com上的引用):
--gnu_instrument, --no_gnu_instrument此选项插入GCC风格的插装,要求分析函数的输入和退出。 使用 函数输入后和函数退出之前,将使用当前函数及其调用站点的地址调用以下分析函数: void __cyg_profile_func_enter(void *current_func,void *callsite); void __cyg_profile_func_exit(void *current_func,void *callsite); 限制 您必须提供__cyg_profile_func_enter()和__cyg_profile_func_exit()的定义。 使用__cyg_profile_func_enter()和__cyg_profile_func_exit()显式标记__attribute__((no_instrument_function))是必要的。 也见__attribute__((no_instrument_function))函数属性
至于-fdump-rtl-expand选项:我不知道(也不认为) armcc在内部使用RTL。因此,我认为从扩展pass中获取日志没有任何意义。
https://stackoverflow.com/questions/12561709
复制相似问题