[mercury-users] Debug prints get optimized away

Ian MacLarty maclarty at cs.mu.OZ.AU
Tue Feb 21 20:50:59 AEDT 2006


On Tue, Feb 21, 2006 at 10:07:27AM +0100, Ondrej Bojar wrote:
> Thanks for your tips.
> 
> I'll probably use the verbose if version suggested by Michael.
> The use of debugger is not imaginable for the problems I'm dealing with 
> and I also do not like removing all optimizations from the code.
> 
> Doing some experiments in computational linguistics I need to process 
> and collect quite big amounts of data. I usually debug the code on a 
> tiny sample (in fact there is always very little to debug once the code 
> compiles, thanks to Mercury). Tiny data samples work just fine, but then 
> suddenly some unexpected crashes come after half an hour or hours 
> processing the bigger data.
> 

Yes, using the debugger on such long running programs can be
problematic, since you loose the tail recursion optimization with
debugging.  You can pass the --trace-optimized mmc option to allow all
optimizations in the debugger, however, at least in 32-bit mode, the
event number will then overflow.

Ian.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list