Is there a C equivalent to the Dumper () Perls method in Data :: Dumper?

Essentially, I'm looking for a function that would allow me to do something like this:

Rollover (some_obj); / * displays the data structure some_objs * /

Thank.

+2
source share
2 answers

C does not support any reflection out of the box. In addition, it is not difficult to print in the sense that after it is compiled into machine code, there are no more types (unlike some languages ​​of a higher level). You need to create your executable file with all the symbols and debugging information, and then use some debugging tools or libraries to extract this data.

, , Visual Studio Debugger gdb, .

+3

: .

: , , . C ( ++) , ​​ .

: Windows, (, PDB) API DbgHelp.

+2

All Articles