You are not logged in.
I installed arch on a new disk. I immediately noticed gdb pretty printing wasn't working. How do I fix this?
To test you can execute gdb then write
python print(gdb.printing)
On arch I get
> Error occurred in Python: module 'gdb' has no attribute 'printing'
On my other OS where it works I get the output "<module 'gdb.printing' from '/usr/share/gdb/python/gdb/printing.py'>"
You can also test by making a ~/.gdbinit file with
python
gdb.printing.RegexpCollectionPrettyPrinter
end
Starting gdb will report
> .gdbinit:3: Error in sourced command file:
> Error occurred in Python: module 'gdb' has no attribute 'printing'
Last edited by EBADFD (2025-03-31 17:03:46)
Offline
python import gdb.printing
Edit: https://man.archlinux.org/man/extra/gdb/gdbinit.5.en
Last edited by seth (2025-03-31 14:11:43)
Offline
That worked. Thanks
Do you know if this was a breaking change from something arch did or was it gdb 16? I'm not sure why you linked to the man page it doesnt say anything about python or printing
Offline
No idea whether that has changed at some point, but the mapage is for gdbinit what should™ allow you to automatize this (if you want to)
Offline