I need to find away to examine a process's memory, call stack and
symbol table WHILE it is running. Preferablly I do not want to use
ptrace since the process itself needs to examine the these values.
The application is where it function X which can be called by an
arbitary number of other functions (directly or indirectly). Function
X needs to know for any given parameter the first function in the call
stack that has that parameter as a paramter. Ex.
#define MAXLINE 1024
main()
{
a("hi");
b("foo");
a(char *s)Quote:}
{
b(s);
b(char *s)Quote:}
{
c(s);
c(char *s)Quote:}
{
char func_name[MAXLINE];
func_name=find_func(s,"char *"); // the function that I
am asking about in the post
printf("%s\n",func_name);
would print:Quote:}
int a("hi")
int b("foo")
The actual output will be a lot more terse.