View Issue Details

IDProjectCategoryView StatusLast Update
0000586LDMudEfunspublic2008-12-29 18:15
Reporterfufu Assigned To 
Status newResolutionopen 
Summary0000586: Allow querying single stack frames using debug_info(DINFO_TRACE)
DescriptionThere is some demand for efuns like previous_function(), previous_program() and a variant of previous_object that reflects the actual control stack. In principle, debug_info(DINFO_TRACE, DIT_CURRENT) provides this information already, but it only allows to query the whole stack trace at once, and building that isn't exactly cheap.

Proposal: Add an extra (optional) argument to debug_info: debug_info(DINFO_TRACE, DIT_CURRENT, n) would return the current (n=0), calling (n=1), and so on stack frame info, or 0 if the stack depth is exceeded.

For consistency this should also be implemented for DIT_ERROR and DIT_UNCAUGHT_ERROR. Interestingly, performance is not an issue in those cases: The array is built when the error happens, and debug_info() just returns a reference to that.
TagsNo tags attached.
External Data (URL)


duplicate of 0000262 closed LDMud caller_stack() should include function names 
related to 0000569 closed LDMud 3.3 Extend caller_stack() to optionally include filename, function name and line number information 
related to 0000202 new LDMud New efuns: previous_program() 



2008-12-29 18:15

administrator   ~0000842

In 0000569 was suggested to add a flag in the stack trace to indicate if the function call was a call_other (inter-object call) or a intra-object function call. I think, we should keep track of this suggestion here.

Issue History

Date Modified Username Field Change
2008-12-12 17:18 fufu New Issue
2008-12-29 18:12 zesstra Relationship added related to 0000569
2008-12-29 18:15 zesstra Note Added: 0000842
2009-09-30 17:58 zesstra Relationship added duplicate of 0000262
2009-10-02 09:55 zesstra Relationship added related to 0000202