This mechanism works for both mi and the cli In the least, a pretty printer needs to have a constructor which accepts a gdb.value (which is the value of the register you are printing) and a to_string function that will return a string (which will be shown as the value of the variable in gdb). Using these, we were able to provide clearer presentation of our data and to automatically walk data structures for display. By default, gdb may display raw data that can be difficult to interpret, especially for intricate structures Objects can be global, the program space’s file (see progspaces in python), and the object files. The problem is gdb doesn't load the pretty printer for c++ stdcxx automatically
This articale shows you how to create such printers via gdb's python api. You create a basic printer in minutes Use time to your advantage.
OPEN