On Thursday, 24 October 2019 at 14:20:42 UTC, Mihails wrote:
On Thursday, 24 October 2019 at 13:16:39 UTC, Johannes Riecken wrote:
GDB uses internal functions of C++'s runtime to do the pretty-printing for C++. Implementing that for D's runtime library in its current form would seem like a considerable effort to me, since D's runtime library seems to be a bit hairier with respect to the internal fields, no?

That wouldn't be a considerable effort on its own (I think all necessary machinery is already part of druntime.rt package) but right now you would need to have druntime built with debugging symbols to get anything done.

For C++ standard containers it is not a problem because those are defined in header files. If AA implementation was switched to templates, it would "just work" for druntime too.

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.

Reply via email to