Thanks a lot, Matthias and Hieu!
I have the debug version in Eclipse already and can compiled it without
errors.
I could follow the debugging until to decoder(translation):
pool.Submit(task); // in Exportinterface.cpp
I didn't find a way to see what happen in the 'translation' task, e.g. how
Hi Yuqi,
I don't know. But maybe something like running a profiler on a
small-scale setup and printing the call graph would be more convenient
anyway? If you don't just want to try and read the source code right
away.
Maybe someone else has better suggestions.
Cheers,
Matthias
On Mon,
You can use gdb to put breakpoints on the code and step through it.
I personally use Eclipse+CDT to do my debugging, it's just a front end to
gdb. You can see this video by Dominik to see how to set up Eclipse with
moses
https://vimeo.com/129306919
Hieu Hoang
http://www.hoang.co.uk/hieu
On 5
Hello,
How can I debug the decoder?
Must I turn off the pre-compile signal "WITH_THREADS"?
Can it be turned off? (Since I have a try, but some head files regarding
threads are always included.)
Or is there any other way to allow me to get into the decoder?
Thanks a lot!
Best regards,
Yuqi
Hi Yuqi,
You can build a debug compile by calling bjam with:
--variant=debug
Cheers,
Matthias
On Sun, 2015-10-04 at 23:05 +0200, Yuqi Zhang wrote:
> Hello,
>
>
> How can I debug the decoder?
>
>
> Must I turn off the pre-compile signal "WITH_THREADS"?
> Can it be turned off?
i think it might be
./bjam variant=debug
not
./bjam ... --variant=debug
Also, please git pull. There was a minor compile error when using this
option, which has now been fixed
https://github.com/moses-smt/mosesdecoder/commit/72bef00781de9821f2cff227ca7417939041d4e1
On 04/10/2015