debugger blues
cy via Digitalmars-d
digitalmars-d at puremagic.com
Fri Mar 25 02:12:56 PDT 2016
On Friday, 25 March 2016 at 08:21:29 UTC, Vladimir Panteleev
wrote:
> Perhaps have a look at what etc.linux.memoryerror does.
Oh, there it is! In druntime! Oh look, inline assembler! No
architectures outside of X86/X86_64. Manually editing the bytes
of your stack context!
I think I'll just go cry in the shower now.
>> * DWARF debugging symbols that don't scramble the only program
>> on earth that actually uses them.
>
> What compiler flags did you use?
make -f posix install
...
I learned about BUILD=debug after that, but haven't tried it yet.
Takes a _long_ time to compile phobos.
> Having an up-to-date GDB might help.
And an up-to-date GCC, and my own custom version of glibc while
I'm at it, and both GDC and DMD, and Phobos, and DRuntime.
> This sort of works:
>
> try
> throw new Exception(null);
> catch (Exception e)
> context = e.toString().splitLines()[1..$];
Huh, neat... I'll have to remember that.
>> * catching null pointer errors earlier, instead of waiting
>> until you 1) call the class function and 2) the function
>> accesses a member.
>
> Doesn't this already happen if you compile without -release?
Apparantly not, because I've never compiled without -debug, and I
infrequently get "null this" errors after having called the
function...
> Calling a class method will invoke the class invariant hidden
> virtual method,
...in a struct, not a class.
> Structs have this: @disable this(this);
I use that very liberally.
More information about the Digitalmars-d
mailing list