Hi,
I am new to AIX and I am developing a small tool for our product which helps debug memory leaks etc.
Q1)Is there a way in which i can get a function trace back as to the call (lets say malloc() )has been made in which file--> in which function.
I tried using the
#pragma options ( i might be making a mistake in the sub options for tbtable would need guidance here too)
and
-qtbtable=full
which says that a full stack trace would be appended as a text file at the end of the object file that we create if we create the obj file using the -g option.
But I dont seem to see any stack trace at the end of the obj file.
Can someone tell me what possibly could be my mistake? or suggest a better way of getting a stack trace
now using __builtin_return_address() i can get the code address from where the fucntion call ( malloc() ) has been made.
Q2)Is there any function which will help me find the line number of the function call ( malloc() ).
On HP UX we have addr2line() function which does this thing... on AIX i dont have an idea which function does it.
Thank you very much in advance.
Regards