[m-dev.] Stack dump not available in this grade.

Ian MacLarty maclarty at csse.unimelb.edu.au
Tue Jan 5 14:55:29 AEDT 2010


On Tue, Jan 5, 2010 at 1:49 PM, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
>
> Hi.
>
> I'm using asm_fast.gc.decldebug and despite this being a debugging grade after
> an exception is thrown the runtime does not print out a stack trace.
>
>    Uncaught Mercury exception:
>    Software Error: map.lookup: key not found
>            Key Type: int
>            Key Value: 5
>            Value Type: set_ordlist.set_ordlist(int)
>    Stack dump not available in this grade.
>
> Am I misunderstanding asm_fast.gc.decldebug or do I need an extra flag or grade
> component to convince Mercury that it can do this.  Note that I can use mdb and
> issue the 'stack' command to get a stack trace, so runtime support is
> definitely available.
>

It should dump the stack.  I tried running the following program in
asm_fast.gc.decldebug with the latest compiler and I got a stack dump:

:- module test.

:- interface.

:- import_module io.

:- pred main(io::di, io::uo) is det.

:- implementation.

:- import_module map.

main(!IO) :-
    _:int = map.lookup(map.init:map(int, int), 1).

Ian.

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list