Blog post about printing associative arrays from GDB

Johannes Riecken johannes.riecken at gmail.com
Wed Oct 23 20:52:55 UTC 2019


I've written a blog post about printing custom data structures 
from GDB using dlopen that I hope some of you find interesting 
and I'd also be happy to discuss it:

https://medium.com/dunnhumby-data-science-engineering/how-to-simplify-debugging-unit-tests-in-d-a2b52c5c1fa

Please let me know if there are any better ways to print data 
structures like associative arrays from GDB, maybe by using 
functions from the runtime library. Another exciting idea would 
be to automate the pretty printing, maybe also by looking how the 
pretty-printers for C++ in GDB 7+ are defined. I sadly haven't 
read much D code from outside our company; is there a Phobos 
function to automatically print expected and actual values for 
failed assertions? In our company we use ocean's test!("==").


More information about the Digitalmars-d-announce mailing list