This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Trace functions
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Raphael COTTY <raphael dot cotty at sagem dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Wed, 6 Nov 2002 12:31:14 +0100
- Subject: Re: [ECOS] Trace functions
- References: <OF7D710961.0D382B9E-ONC1256C69.00380FC9@sagem.com>
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