I'm using assert's in my code and switching the NDEBUG flag to remove them at compile time, but my code is very modular and seperated among many c files. Is there a way to find out where the originating call to a function came from upon failure? Assert fails and reports the file and line, but that isn't entirely useful with generic code. After time, the problem can be found but i'd like a more specific error report.
can I pass the " __FILE__ " etc.. attribute to functions? I guess I would have to not use asserts but develop my own, if I did include the '___FILE__ attribute i would have to macro all my functions so the caller's didn't know this was going on....
Just looking for a good solution that is efficient, thanks.