I want to write a debug function or method that will help print useful information. When it is called, I need:
- the memory address of the calling object (if called by an object)
- the method signature of the caller (or the name of the method), or the name of the function
- the class name that owns that method or function
Is it possible to get this information without passing a whole bunch of parameters?
I want to make something like:
debug();
which then goes into every method and function, and helps printing out useful informations about what's going on.