I am trying to print a struct
that is coming as an argument in a function in order to do some debugging.
Is there anyway I could print a structure's contents without knowing what it looks like, i.e. without printing each field explicitly? You see, depending on loads of different #define
s the structure may look very differently, i.e. may have or not have different fields, so I'd like to find an easy way to do something like print_structure(my_structure)
.
NetBeans' debugger can do that for me, but unfortunately the code is running on a device I can't run a debugger on.
Any ideas? I suppose it's not possible, but at least there may be some macro to do that at compilation time or something?
Thanks!