I'm currently experimenting with a variation of dump_stack in system.inc.
The first try skips a lot of the functions found by your initial
implementation. Still looking into that.  
 

Got to the cause of this problem. The stack unwind is fine. The backtrace
looks like bt in gdb except for the non-stackframe routines (I think I have
found a fix for that one too). The problem is in the unit lineinfo. There is
a global variable staberr:boolean that, once set, aborts subsequent calls to
GetLineInfo. It is set by an error in openstabs and there is no way to reset
it. Limiting the traced addresses to the ones inside the main application
solves that one but limits obviously the output (no runtime loaded
libraries, etc).
 
Attached the patch for the stack unwind (without non-stackframe routines).
Note that all assembler is gone!
 
Ludo
 
 

Attachment: uProcMemStat.diff
Description: Binary data

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to