[mercury-users] Compiled a library, linked to a program... but no calls are performed

Ondrej Bojar oboj7042 at ss1000.ms.mff.cuni.cz
Fri Mar 7 05:43:11 AEDT 2003

On Fri, 7 Mar 2003, Fergus Henderson wrote:
> Firstly, are you compiling with `--no-fully-strict'?

No, I'm not. Anyway, other predicates are semidet etc.

> If so, the compiler will rightly optimize away calls to debugstr and
> similar procedures, since they are declared `det', pure, and have no outputs.
> In general using impure procedures but not marking them as impure is a
> recipe for problems.  It is a lot safer to mark such procedures as `impure'.

I know. Sorry for introducing bad habits to Mercury.

> Secondly, what happens if you enabled debugging, and step through it with
> `mdb'.  Do the routines from the library get called then?

I have no experience with mdb yet. I compiled everything with --trace deep
(for some reason grade --debug claimed, that there are standard library
modules missing, so I guess that the debugging grades of --high-level-code
are not in my rotd-2003-01-29.

Now I'm trying to 'step into' my program with mdb, however, mdb always
runs the program without a break.

I've created .mdbrc in the working directory, home directory, and written
to these files things like:

break main
break -A main
break here

...but mdb still happily runs the code as a whole and doesn't even
complain about the sdkhjhjkfd.

My $MERCURY_DEBUGGER_INIT is not set at all, but mdb doesn't complain (as
it probably should, according to the documentation.)

Thanks for a hint!

Thanks, Andrew.

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