simple examples of how to

Showing posts with label function backtrace. Show all posts
Showing posts with label function backtrace. Show all posts

Friday, October 21, 2011

[Cheating in C] How to know a certain function is called by which function.

When you want to know which function calls a function name A(), and there are many other functions that call A(), here is simple cheating.

First, find out the condition that you want to know who calls A() and make a hard coding there like this.

if( the condition you want ) {
int *a=0;
*a=0;
}

and run with GDB