开发者

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

开发者 https://www.devze.com 2023-03-26 06:55 出处:网络
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

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

精彩评论

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