Re: Blog post about printing associative arrays from GDB

2019-11-12 Thread Johannes Riecken via Digitalmars-d-announce
I'd also be very interested in how to get this working with dmd.

Re: Blog post about printing associative arrays from GDB

2019-11-12 Thread Johannes Riecken via Digitalmars-d-announce
I created an initial version and would be glad to get some feedback. I couldn't figure out how to call the _AAGetX-style functions, so I just went with the approach in my blog post to get something working that can be refactored later. Here is the code. It currently works with gdc, but not

Re: Blog post about printing associative arrays from GDB

2019-10-25 Thread Mihails via Digitalmars-d-announce
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

Re: Blog post about printing associative arrays from GDB

2019-10-24 Thread Johannes Riecken via Digitalmars-d-announce
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

Re: Blog post about printing associative arrays from GDB

2019-10-24 Thread Mihails via Digitalmars-d-announce
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

Re: Blog post about printing associative arrays from GDB

2019-10-24 Thread Johannes Riecken via Digitalmars-d-announce
On Thursday, 24 October 2019 at 11:20:07 UTC, Mihails wrote: GDB has some dedicated functionality to improve pretty-printing and expression evaluation of things that too complex to figure out automatically: - https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html -

Re: Blog post about printing associative arrays from GDB

2019-10-24 Thread Mihails via Digitalmars-d-announce
GDB has some dedicated functionality to improve pretty-printing and expression evaluation of things that too complex to figure out automatically: - https://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html - https://sourceware.org/gdb/onlinedocs/gdb/Writing-an-Xmethod.html GCC, for

Re: Blog post about printing associative arrays from GDB

2019-10-24 Thread Johannes Riecken via Digitalmars-d-announce
On Wednesday, 23 October 2019 at 21:07:24 UTC, Dennis wrote: Thanks for spitting through the GDB manual so I don't have to! I would've guessed something like this was possible with GDB, but never bothered until now. On Wednesday, 23 October 2019 at 20:52:55 UTC, Johannes Riecken wrote: is

Re: Blog post about printing associative arrays from GDB

2019-10-23 Thread Dennis via Digitalmars-d-announce
Thanks for spitting through the GDB manual so I don't have to! I would've guessed something like this was possible with GDB, but never bothered until now. On Wednesday, 23 October 2019 at 20:52:55 UTC, Johannes Riecken wrote: is there a Phobos function to automatically print expected and

Re: Blog post about printing associative arrays from GDB

2019-10-23 Thread kinke via Digitalmars-d-announce
Hi, Now wouldn’t it be even more useful if we knew why the unit test failed? Apparently D doesn’t print that information automatically on assertion failure, supposedly for performance reasons. Off-topic, but recent frontends feature a `--checkaction=context` switch, which for your example

Blog post about printing associative arrays from GDB

2019-10-23 Thread Johannes Riecken via Digitalmars-d-announce
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