SNagar78 <na**********@gmail.comwrote:
is there is a way to print the stack trace inside a running C program
to find the trace of calls that made it to reach at that point?
Not portably; and indeed, because of optimisations, there may in some
cases simply be no stack trace of a form you'd recognise. Think, for
example, about tail optimisation of recursive calls.
It is possible that whatever development platform you're using has a
tool, or even a set of C-callable functions, that you can use. But these
will vary rather strongly between platforms, so you'll have to ask about
those in a newsgroup and/or mailing list or web forum dedicated to that
platform.
Richard