From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.7) Gecko/20050421 Firefox/1.0.3 (Debian package 1.0.3-2) Description of problem: I tried to use -finstrument-functions on ia64 itanium processors and adresses seems to be incorrect in functions __cyg_profile_func_enter(...) when I look at nm <my_prog> ouput. The same program works well on ia32. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. gcc -Wall -finstrument-functions -g -o prof prof.c 2. ./prof Actual Results: I have an address of a function that I tried to match with the 'nm prof' output. Expected Results: Exact matching between the __cyg_profile_func_enter(...) and nm output. Additional info:
Created attachment 114423 [details] testcase for -finstrument-functions on ia64 To compile: gcc -Wall -finstrument-functions -g -o prof prof.c ./prof and try to match with an 'nm prof' output
The arguments are correct. __cyg_profile_func_{enter,exit}'s first argument is address of the function that is being entered (resp. exited). On IA-64, function addresses are function descriptor addresses, so you can compare them with function addresses in C/C++ code. If (this_func == (void *) f1) is correct comparison. If you want to get the .text address of the function body instead, you need to read it from the function descriptor. So *(void **)this_func.
Thank you very much.