It greatly simplifies the display of complex objects Use time to your advantage. 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). You create a basic printer in minutes Using these, we were able to provide clearer presentation of our data and to automatically walk data structures for display.
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.