On Monday, 20 February 2017 at 13:55:57 UTC, ANtlord wrote:
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.

My bad again. It appears I have a smaller knowledge that I think. I'm ended up in typecons because `allocator` is made by template `scoped` returns instance of internal static struct `Scoped` and it has alias is asigned to method `Scoped_payload` and this is called on https://github.com/ANtlord/DCD/blob/master/src/server/autocomplete.d#L341.

SOLVED

Reply via email to