Hi all,
I'm interested in getting stack information via an UDP message with an ASCII
log trace inside. Basically, I cannot get the information using a printf. I
found the function rtems_stack_checker_report_usage_with_plugin(rtems_printer*
printer) in order to get the information and send it using my UDP log function.
So first of all I created a function called logPlugin (I used as exampled the
plugin at printf_plugin.c):
static int logPlugin(void *context, const char *format, va_list ap)
{
(void) context;
return addLog(INFO, STACK,format, ap); /* First two arguments are used to
classify message at reception*/
}
Then at rtems_stack_checker_report_usage_with_plugin calling scope:
rtems_printer printer;
printer.context = NULL;
printer.printer = logPlugin;
rtems_stack_checker_report_usage_with_plugin(&printer);
It is important to say that addLog puts the message in a circular buffer that
other task will read and send the content using UDP.
When stack checker report usage is called, only the information header is
printed: " STACK USAGE BY THREAD\n"
"ID NAME LOW HIGH CURRENT AVAIL
USED\n"
Next, stack values are not printed correctly and I can only get a value that is
constant and equal to the same memory location (in decimal). It is a correct
guide to implement this? I do not know how to use the printer struct context
variable, can this cause my problem?
Thanks in advance,
Regards,
________________________________
[cid:[email protected]]
Fernando Domínguez Pousa
Ingeniero de Software
Software Engineer
GMV
Isaac Newton, 11
P.T.M. Tres Cantos
E-28760 Madrid
Tel. +34 91 807 21 00
Fax +34 91 807 21 99
www.gmv.com <http://www.gmv.com/>
[cid:[email protected]]<http://www.facebook.com/infoGMV>
[cid:[email protected]]<http://www.twitter.com/infoGMV_es>
[cid:[email protected]]<https://plus.google.com/+Gmvcompany>
[cid:[email protected]]<http://www.youtube.com/infoGMV>
[cid:[email protected]]<https://www.linkedin.com/company/gmv>
[cid:[email protected]]<http://www.gmv.com/en/RSS>
[cid:[email protected]]<http://www.gmv.com/blog_gmv/language/en/>
P Please consider the environment before printing this e-mail.
_______________________________________________
users mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/users