This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trace functions


On Wed, Nov 06, 2002 at 11:14:01AM +0100, Raphael COTTY wrote:
> Hello,
> I would like to use the trace functions (CYG_REPORT_FUNCTION for example)
> in my application without tracing the kernel.
> Is it possible ?

I think so. You should read packages/infra/current/include/cyg_trac.h
and cdl/debug.h.

Configure eCos with component CYGDBG_USE_TRACING enabled, but
CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS disabled. This should get you the
infrastructure you need included into eCos, but not enable tracing in
the kernel. Build eCos like this.

Then in your application code, you need to override the setting of
CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS so that the macros actually trace
and don't do NOPs. Do something like

#ifdef CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS
#undef CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS
#endif 
#define CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS
#include <cyg/infra/cyg_trac.h>

You will need to play with this. Im just reading the code so could be
missing something......

When you get it working could you report back what you had to do.

What would be nice is a second set of macros CYG_REPORT_APP_FUNC*
which have there own cdl to control them. 

        Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]