Debug Functions


Detailed Description

These group of functions enhance the debugging capability of TiROS.


Functions

osptr_t hal_pc_from_ctxt (osstkptr_t ctxt_ptr)
osword_t hal_stkusage_max (osstpktr_t ctxt_ptr, osstkptr_t base_stkptr, osword_t stksize)
osword_t hal_stkusage_curr (osstpktr_t ctxt_ptr, osstkptr_t base_stkptr, osword_t stksize)


Function Documentation

osptr_t hal_pc_from_ctxt ( osstkptr_t  ctxt_ptr  ) 

Compute the program counter, from the stored context This function is used for debugging.

Implement this by extracting the program counter out of the context (or stack pointer) if possible.

Parameters:
ctxt_ptr The pointer to the task context
Returns:
The program counter

osword_t hal_stkusage_max ( osstpktr_t  ctxt_ptr,
osstkptr_t  base_stkptr,
osword_t  stksize 
)

Return the maximum stack occupancy of the task.

This hal implemented function should provide the maximum stack occupancy of the task whose context is given. This is used for debugging. It is valid for this function to return 0, if this information is not readily extractable.

Parameters:
ctxt_ptr Context of the task.
base_stkptr The initialization stack value for this task that was passed to hal_stk_init
stksize The initial stack size for this task that was passed to hal_stk_init
Returns:
The maximum stack occupancy

osword_t hal_stkusage_curr ( osstpktr_t  ctxt_ptr,
osstkptr_t  base_stkptr,
osword_t  stksize 
)

Return the current stack occupancy of the task.

This hal implemented function should provide the current stack occupancy of the task whose context is given. This is used for debugging. It is valid for this function to return 0, if this information is not readily extractable.

Parameters:
ctxt_ptr Context of the task.
base_stkptr The initialization stack value for this task that was passed to hal_stk_init
stksize The initial stack size for this task that was passed to hal_stk_init
Returns:
The current stack occupancy


TiROS User Manual: Last Updated on Fri Jul 20 10:52:24 2007