Step into in debugging.
ANtlord via Digitalmars-d
digitalmars-d at puremagic.com
Mon Feb 20 05:55:57 PST 2017
Hello! I care for project DCD. I've wanted to fix some issue in
it very long time ago. But when I get a little bit of free time I
encounter one big problem for me.
I can't debug it using GDB. I can't go through call stack because
I get a number of issues. Long story short I've decided to solve
them one by one and I really need community's help.
First of them. I can't make `step into` staying on this code line
https://github.com/ANtlord/DCD/blob/master/src/server/autocomplete.d#L341.
What I do:
1. I compile DCD project using dub with dmd `dub build
--compiler=dmd --build=debug --config=server --parallel`
2. I run `gdb <path/to/dcd-server>`. I do it from project root
directory always `gdb dcd-server`.
3. Inside gdb. I do `break autocomplete.d:341`
4. Inside gdb. I do `run -p 6767` where `-p 6767` is DCD
parameter.
5. I launch dcd-client with parameters for calling desirable code
`dcd-client --port 6767 myfile.d -c 53`. File `myfile.d`
consists of `void main(string[] args) { int[] asd = [4,2];
asd[0]. }`. Yes, it has one line.
6. Inside gdb. I stay on desirable line and I do `step`.
7. Inside gdb. I am ended up in
`/usr/include/dlang/dmd/std/typecons.d:6097` instead function
`generateAutocompleteTrees` called on the line.
I attach this screenshot to be clear
https://www.dropbox.com/s/6i2hmbvqwdvopur/Screenshot_20170220_214526.png?dl=0
Thanks.
More information about the Digitalmars-d
mailing list