Blog post about printing associative arrays from GDB

Mihails none at none.none
Fri Oct 25 10:59:13 UTC 2019


> Cool, if you (or someone else) can give me the fields or 
> functions in the druntime.rt package that can be used to print 
> associative arrays from GDB, then I can try my hand at building 
> a pretty-printer using GDB's Python API next week.

AA implementation is provided by 
https://github.com/dlang/druntime/blob/master/src/rt/aaA.d, and 
you can either try reimplementing key logic in Python (more work 
but cleaner impl) or just call relevant functions via gdb python 
api and parse results. It should actually be possible to call 
functions like __aaGetX even with release build of druntime, you 
just to do a manual cast to the correct function type from a raw 
pointer.


More information about the Digitalmars-d-announce mailing list