When compiled with -g, we produce binaries which contain a gdb_load_rust_pretty_printers.py in .debug_gdb_scripts section. This makes gdb complain about missing scripts when run under plain gdb as opposed to the
You can also load GDB Python scripts using this technique as well. Let’s create a hello_py command in a file hello.py.# hello.py import gdb class HelloPy(gdb.Command): def __init__(self): super(HelloPy, self).__init__('hello_py', gdb.COMMAND_USER) def invoke(self, _unicode...