# OS_EnableCallTrace

## Syntax

  `#include <nitro/os.h>`
  `BOOL OS_EnableCallTrace( void );`

## Arguments

None.

## Return Values

The status before this function was called. TRUE indicates that it was enabled. FALSE indicates that it was disabled.

## Description

Enables the function call trace.

This switch decides whether the function entry and exit (`__PROFILE_ENTRY`, `__PROFILE_EXIT`) that are inserted by the `profile` feature will become enabled. When you use the function call trace feature in stack mode, be careful of your timing when you toggle the feature between enabled/disabled. For example, if you call a function called `test()` when in disabled status, and then enable the feature from within the `test()` function, the data will be inconsistent because at `__PROFILE_EXIT` the feature will attempt to discard from the stack the fact that `test()` was called, even though nothing was stored at the function entry (`__PROFILE_ENTRY`). Log mode only obtains records at `__PROFILE_ENTRY`, and therefore you can change status at any point.

Enable switches are set separately for each trace buffer. Therefore one will not enable all.

If this function is compiled for debugging, it will function properly. However, if compiled for the final ROM version (`FINALROM`) library, it will not do anything.

## See Also

`OS_InitCallTrace, OS_DisableCallTrace, OS_RestoreCallTrace
`

## Revision History

2004/04/23 Initial version.

CONFIDENTIAL