debugger blues
cy via Digitalmars-d
digitalmars-d at puremagic.com
Thu Mar 24 22:59:01 PDT 2016
I've been working for 3 days straight on this: the monumental
task of taking these text files and turning them into HTML. Or
should I say, FML, because FML. Why is this so hard?
My code is peppered with writelns and sanity checks, none of
which show anything alarming until long after the document gets a
self referential cycle in it, and apparantly this is happening by
"creating a child and appending it to a node." Obviously that's a
rare and obscure operation, that nobody ever would think of doing.
I can't do any introspection. GDB just goes belly up with DIE
errors. Trying to get non-broken DWARF information by switching
to GDC, GDC goes belly up with "internal error, please submit a
bug report" and the reason for this error is creating a module
named "cross.iter" and adding a sixth exported symbol to it.
In reflection, what would be really nice is:
* some way to trace function calls, to see the order of calls
before the program died.
* a backtrace that displays when you hit ^C, instead of just
silent death
* DWARF debugging symbols that don't scramble the only program on
earth that actually uses them.
* some way to signal the program to dump the stack frames of its
threads to a log
* better ways to report program status besides writeln("we got
here somehow");
* catching null pointer errors earlier, instead of waiting until
you 1) call the class function and 2) the function accesses a
member.
* ways to ensure that nothing is being copied, if you
accidentally write a wrapper that creates an object instead of
referencing it, or moving it.
* better const support, so can minimize the amount of mutable
data involved here
* it would be nice to be able to return an iterator whose
elements are either const or not const, using inout, instead of
having to write the function twice.
* it would also be nice to be able to return references, instead
of copying structs every time, or writing wrappers around them
(which also cannot be used with inout)
* heap allocated structs, stack allocated classes, it would be
nice to have allocation strategy independent from layout strategy.
* less people writing complex allocating functions as their
struct init property, and then leaving me wondering how that
could possibly be invariant.
* a pony
More information about the Digitalmars-d
mailing list