1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>OS_DumpCallTrace</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_DumpCallTrace <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD><CODE>#include <nitro/os.h></CODE><BR> 15 <BR> 16 <CODE>void OS_DumpCallTrace( void );</CODE> 17</DL> 18<H2>Arguments</H2> 19<P>None.</P> 20<H2>Return Values</H2> 21<P>None.</P> 22<H2>Description</H2> 23<P>This function displays function call trace information.</P> 24<P>It displays the trace information that is present at the time it is called. If you are using a thread system, it will display information for the current thread. To display information for a particular thread, use <A href="OS_DumpThreadCallTrace.html"><CODE>OS_DumpThreadCallTrace()</CODE></A>.</P> 25<P>The following is a description of trace information in the case of stack mode:</P> 26<BLOCKQUOTE>(Display Example)<br> 27<BLOCKQUOTE><CODE>OS_DumpCallTrace: lr=0x02004438<BR> 28 test3: lr=0x0200447c, r0=0x000000cb<BR> 29 test2: lr=0x020044b0, r0=0x000000c9<BR> 30test1: lr=0x0200426c, r0=0x000000c8<br></CODE></BLOCKQUOTE> 31The example indicates that currently, <CODE>OS_DumpCallTrace()</CODE> is called, trace information is displayed, and the function returns the address <CODE>0x2004438</CODE>. Prior to that <CODE>test3()</CODE> was called and the address <CODE>0x2004447c</CODE> was returned. Prior to that <CODE>test2()</CODE> was called and the address <CODE>0x20044b0</CODE> was returned. Prior to that <CODE>test1()</CODE> was called and the address <CODE>0x200426c</CODE> was returned. (The display of <CODE>r0</CODE> is optional.)<BR> 32<IMG src="img02.jpg" border="0" width="560" height="322"></BLOCKQUOTE> 33<P>The following is a description of trace information in the case of log mode.</P> 34<BLOCKQUOTE>(Display Example)<br> 35<BLOCKQUOTE><PRE>OS_DumpCallTrace: lr=0x02004438 36 test3: lr=0x0200447c, r0=0x000000cb 37 test2: lr=0x020044b0, r0=0x000000c9 38test1: lr=0x0200426c, r0=0x000000c8 39 test3: lr=0x0200447c, r0=0x000000cb 40 test2: lr=0x020044b0, r0=0x000000c9 41test1: lr=0x0200426c, r0=0x000000c8</PRE></BLOCKQUOTE> 42The example indicates that currently, <CODE>OS_DumpCallTrace()</CODE> is called, trace information is displayed, and the function returns the address <CODE>0x2004438</CODE>. Additionally, before this function was called, of the functions that were compiled with the <CODE>profile</CODE> feature ON, <CODE>test1</CODE> -> <CODE>test2</CODE> -> <CODE>test3</CODE> -> <CODE>test1</CODE> -> <CODE>test2</CODE> -> <CODE>test3</CODE> were entered, in this order. However, which function called what function cannot be determined.</BLOCKQUOTE> 43 44<P>Concerning R0 – R3 register display: Including this information in the function call trace buffer is optional. Including one register will cost 4 additional bytes in the buffer for each function call. Including the 4 registers R0 – R3 will cost 16 additional bytes for each function call. The R0 that is displayed is the value at the time that the function is called. In the case of C function arguments, it will be the first argument. R1 will be the second argument, R2 will be the third argument, and R3 will be the fourth argument. In the case of functions that do not take these arguments, these arguments will be indeterminate values that have no special meaning. R0 and subsequent information will not be displayed for calls to <CODE>OS_DumpCallTrace()</CODE> or <CODE><A href="OS_DumpThreadCallTrace.html">OS_DumpThreadCallTrace()</A></CODE> themselves.</P> 45<P>If this function is compiled for debugging, it will function properly. However, if compiled for the final ROM version (<CODE>FINALROM</CODE>) library, it will not do anything.</P> 46<H2>See Also</H2> 47<P><CODE><A href="OS_InitCallTrace.html">OS_InitCallTrace</A>, <A href="OS_DumpThreadCallTrace.html">OS_DumpThreadCallTrace</A><BR></CODE></P> 48<H2>Revision History</H2> 49<P>2004/04/22 Added a description of stack mode and log mode.<BR>2004/04/13 Initial version.</P> 50<hr><p>CONFIDENTIAL</p></body> 51</HTML> 52