/** @file trace.h
* @brief Defines interface of trace.c functions (do not modify)
* @details This file defines the interface to a C file trace.c that
* provides a stack dump facility to prints the contents of the stack,
* showing a line for each stack frame containing the previous frame
* pointer, the return address, a specified number of parameters, and
* a specified number of local variables.
*/
/** Print a stack trace.
* Print a header for each column of the stack trace.
* Start with the frame of the function that called this function.
* Do not include the frame for traceStack()
in the output.
*
* @param parms the number of parameters to print for each frame
* in the range 0..9.
* @param locals the number of local variables to print for each frame
* in the range 0..9.
*/
void traceStack(int parms, int locals);
/** Follow the frame pointers recursively to print the stack trace.
* Only print stack frames for the recursive calls on the stack.
* Do not include the stack frame for main()
.
*
* @param framePointer the address of the stack frame to print.
* @param parms the number of parameters to print for each frame
* in the range 0..9.
* @param locals the number of local variables to print for each frame
* in the range 0..9.
*/
void traceNext(unsigned int *framePointer, int parms, int locals);