Possible Duplicate:
use callback function to report stack backtrace
Given a void *eip and an array of struct function symbols that contain the address, symbolic name, and binding of all function symbols in the file, how do I determine the function running at the time of the error?