开发者

Is there any library in C like python's inspect?

Is there any library in C like python's inspect?

def myfunction():
   import inspect
   inspect.stack()开发者_StackOverflow中文版: # this give you complete stack up to this function call

It's very useful to debug python program.

Actually I want to debug GTK Combobox widget, to understand complete flow I need complete function call stack.

So is there any similar library of Technic in C language like python inspect package?


No such portable library exists. There's a solution specific to GNU libc.


If you are using gcc you can have a look at this (old) blog about getting the stacktrace in runtime.

C++ stack traces with GCC

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜