On Saturday, 15 September 2012 at 13:34:02 UTC, alex wrote:
On Saturday, 15 September 2012 at 13:02:32 UTC, Denis Shelomovskij wrote:
....
Again, Digital Mars C runtime library is the problem for everything in D language including DLL-s.

Lol okay I think I've also seen it. I've tried to build a hybrid dll with mixed C and D code (just compiled with dmc+dmd), and it's just not working, even if it's raw C exclusively..


I'll try an other approach now that is probably way more elegant and doesn't need any LoadLibrary calls: I simply create a code cave in the debuggee and inject some assembler into it. The method I'll be executing then takes a variable address (that has been stored in an other space), makes an object pointer out of it, and calls the virtual toString() overload - whereas the pointer to that function is stored at a fixed offset, fortunately. The returned string struct/pointer whatever will be stored to the variable address then (so I don't have to allocate another variable space), and the debug engine will finally read out the string.
That's my theory so far, I hope it'll work somehow :)

@Rainer I'll try my method first, and if that's not working at all, or if it's working, I'll contact you ;)

It's absolutely frickin' awesome - it works! I could inject the assembler code, call the object's toString() method, do everything as I've just explained...it's awesome!! FUCK YEAH I did it..now I can go to sleep :D

@Rainer I'll share it so we both may integrate it into the debuggers then :)

Reply via email to