Open ghost opened 9 years ago
The debugger binding that examines D local values fully-fledged hasn't been finished yet. The current situation is of (on my side as Mono-D's programmer) expected behaviour, unfortunately.
So what needs to happen to make debugging work? :)
I didn't know where I stopped back then, pretty much was already finished. I guess there were design problems with examining objects' types (i.e. associating a given type name with Mono-D's AST representation), deducing their memory offsets and reading their values. The API that wraps reading memory itself works, iirc.
Yea, it works flawlessly for the top one, if only it worked for other functions I would have absolutely no problems with it... Thanks for your work, by the way! Take your time on this...
Thanks, I will - perhaps I can catch up some of the things that aren't working well atm :)
Okay, I spent some time trying to get the gdb D addin working.. I hate how I just can't fluently debug all the crap -- it's giving me headaches all the time :/ Oh and it's crashing on gdb's initialisation phase..it's awful.
I hate how I just can't fluently debug all the crap -- it's giving me headaches all the time :/
This pretty much sums up my experience with programming in general :) Man these high level languages are out of control...
Apparently it seems that the problem is some errornous interaction with gdb which wasn't there before:
gdb: gdb<: -inferior-tty-set /dev/pts/0
gdb: dbg>: =thread-group-added,id="i1"
gdb: dbg>: =cmd-param-changed,param="auto-load safe-path",value="/"
gdb: dbg>: (gdb)
gdb: dbg>: ^done
gdb: dbg>: (gdb)
gdb: gdb<: -file-exec-and-symbols /home/lx/Desktop/dump/D/dubTest/dubtest
gdb: dbg>: ^done
gdb: dbg>: (gdb)
gdb: gdb<: -environment-cd /home/lx/Desktop/dump/D/dubTest
gdb: dbg>: ^done
gdb: dbg>: (gdb)
gdb: gdb<: -data-evaluate-expression mono_pmip
gdb: dbg>: ^error,msg="No symbol table is loaded. Use the \"file\" command"
gdb: dbg>: (gdb)
gdb: gdb<: -data-evaluate-expression sizeof(void*)
gdb: dbg>: ^error,msg="A syntax error in expression, near `sizeof(void*)'."
I also tried doing this in the terminal..same error.
Ok, I've upgraded language bindings to 2.9 and debugging works now!
I haven't changed anything in the debugging-parts, I've only discovered some symptoms that show gdb is misbehaving. :/
Yeah, I wonder what was that. Nonetheless I can see the values in other functions now...
Repro code:
In this case I can see only
args
andmainVal
values because they're on the top most function of the file,main
:If I continue debugging and jump to any other function which is placed below
main
, I see nothing for their variables:Notice that Value of
myVal
in Locals window is empty, as well as in the field hovered by mouse. Same happens forotherFunc
.Now if I change the order of functions in the file so that, say,
myFunc
will be at the top of the file:All variables of
main
function won't show their values now, but if I continue debugging to jump tomyFunc
:Suddenly,
myVal
shows its value because now it's on the top of the file. Same will happen if I moveotherFunc
to the top.I use Monodevelop 5.7 from official repo on Ubuntu 15.04 with D Language Binding v. 2.7.14