I want to create a python pretty printer within gdb. I have a hidden data-type xyzHandle in the program I'm trying to debug. I can pull out some information from that handle with a C function; which I can call within the gdb debugger. For example:
xyzHandle object1 = api_get_first_object();
(gdb) print (char *)xyz_get_string(1, object1)
Run Code Online (Sandbox Code Playgroud)
I know I can create a gdb command like 'pn' and use that; but I want to use the build-in python of (gdb) to create …