[fpc-pascal] Re: Exception callstacks, backtracks...

m utku m.utku.k at gmail.com
Thu Feb 8 02:47:43 CET 2007


Jonas Maebe <jonas.maebe at ...> writes:
 > There's
 >
 > Procedure Dump_Stack(var f : text;bp:pointer);
 >
 > in the system unit. You can use it like this:
 >
 >    dump_stack(stdout,get_frame);
 >

This cleared a lot on my mind, thanks Jonas...

Recently I have tried this:
//------------------------------------------------------
try
    AFunctionThatWillRaiseAnExceptionDeepInside;
except
    Dump_Stack(stdout, ExceptAddr);
end;
//------------------------------------------------------

Unfortunately this did not do what I thought: giving the callstack from the
point of where exception occured. Is there any way for that?

Thanks,
M. Utku Karatas



More information about the fpc-pascal mailing list