c - GDB macro use of some datastructure to hold data while processing -
is possible store data in gdb in data structure dictionary (some sort of key value pairs).
i have core , want important statistics core. able scan through data structure want dump. want extract more meaningful information while walking data structure.
example: trivial example, while walking data structure, want know how many times element occurs in data structure of interest.
is there way can create dictionary in gdb holds key , occurrences value?
it maybe done using gdb cli. however, it's enormous pain -- because want debug core files, , non-trivial data structure, gdb wants allocate memory in inferior, can't done in case.
so, save lot of pain , write python script using gdb's python scripting api. taking route have access of python's data structures. and, simple use gdb's api walk data structures in core file, or other things that.
Comments
Post a Comment