public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Trace functions
@ 2002-11-06  2:14 Raphael COTTY
  2002-11-06  3:31 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Raphael COTTY @ 2002-11-06  2:14 UTC (permalink / raw)
  To: ecos-discuss

Hello,
I would like to use the trace functions (CYG_REPORT_FUNCTION for example)
in my application without tracing the kernel.
Is it possible ?



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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] Trace functions
  2002-11-06  2:14 [ECOS] Trace functions Raphael COTTY
@ 2002-11-06  3:31 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2002-11-06  3:31 UTC (permalink / raw)
  To: Raphael COTTY; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-06 11:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-06  2:14 [ECOS] Trace functions Raphael COTTY
2002-11-06  3:31 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).