1 //==========================================================================
7 //==========================================================================
8 //####COPYRIGHTBEGIN####
10 // ----------------------------------------------------------------------------
11 // Copyright (C) 1999, 2000 Red Hat, Inc.
13 // This file is part of the eCos host tools.
15 // This program is free software; you can redistribute it and/or modify it
16 // under the terms of the GNU General Public License as published by the Free
17 // Software Foundation; either version 2 of the License, or (at your option)
20 // This program is distributed in the hope that it will be useful, but WITHOUT
21 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
25 // You should have received a copy of the GNU General Public License along with
26 // this program; if not, write to the Free Software Foundation, Inc.,
27 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 // ----------------------------------------------------------------------------
31 //####COPYRIGHTEND####
32 //==========================================================================
33 //#####DESCRIPTIONBEGIN####
36 // Contributors: bartv
39 // Description: By default all tracing should be disabled, but
40 // they should compile just fine. This module uses all
41 // of the trace macros. As a fringe benefit, all
42 // of the macros get checked for correct argument usage.
44 //####DESCRIPTIONEND####
45 //==========================================================================
48 #include <cyg/infra/testcase.h>
49 #include <cyg/infra/cyg_trac.h>
52 #ifdef CYGDBG_USE_TRACING
53 # error Tracing should not be enabled by default.
55 #ifdef CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS
56 # error Function reporting should not be enabled by default.
59 #define CYG_TRACE_USER_BOOL (invalid_expression)
60 #define CYG_REPORT_USER_BOOL (invalid_expression)
65 CYG_REPORT_FUNCTION();
71 CYG_REPORT_FUNCTYPE("printf-style format string");
77 CYG_REPORT_FUNCNAME("fn3");
83 CYG_REPORT_FUNCNAMETYPE("fn4", "printf-style format string");
89 CYG_REPORT_FUNCTIONC();
95 CYG_REPORT_FUNCTYPEC("printf-style format string");
101 CYG_REPORT_FUNCNAMEC("fn7");
107 CYG_REPORT_FUNCNAMETYPEC("fn8", "printf-style format string");
113 CYG_REPORT_FUNCTION();
120 CYG_REPORT_FUNCTYPE("result is %d");
121 CYG_REPORT_RETVAL(42);
127 CYG_REPORT_FUNCTION();
128 CYG_REPORT_FUNCARGVOID();
134 CYG_REPORT_FUNCTION();
135 CYG_REPORT_FUNCARG1(fmt, now);
139 fn13(int now, int is)
141 CYG_REPORT_FUNCTION();
142 CYG_REPORT_FUNCARG2(fmt, now, is);
146 fn14(int now, int is, int the)
148 CYG_REPORT_FUNCTION();
149 CYG_REPORT_FUNCARG3(fmt, now, is, the);
153 fn15(int now, int is, int the, int winter)
155 CYG_REPORT_FUNCTION();
156 CYG_REPORT_FUNCARG4(fmt, now, is, the, winter);
160 fn16(int now, int is, int the, int winter, int of)
162 CYG_REPORT_FUNCTION();
163 CYG_REPORT_FUNCARG5(fmt, now, is, the, winter, of);
167 fn17(int now, int is, int the, int winter, int of, int our)
169 CYG_REPORT_FUNCTION();
170 CYG_REPORT_FUNCARG6(fmt, now, is, the, winter, of, our);
174 fn18(int now, int is, int the, int winter, int of, int our, int discontent)
176 CYG_REPORT_FUNCTION();
177 CYG_REPORT_FUNCARG7(fmt, now, is, the, winter, of, our, discontent);
181 fn19(int now, int is, int the, int winter, int of, int our, int discontent, int made)
183 CYG_REPORT_FUNCTION();
184 CYG_REPORT_FUNCARG8(fmt, now, is, the, winter, of, our, discontent, made);
190 CYG_REPORT_FUNCTION();
191 CYG_REPORT_FUNCARG1X(now);
195 fn21(int now, int is)
197 CYG_REPORT_FUNCTION();
198 CYG_REPORT_FUNCARG2X(now, is);
202 fn22(int now, int is, int the)
204 CYG_REPORT_FUNCTION();
205 CYG_REPORT_FUNCARG3X(now, is, the);
209 fn23(int now, int is, int the, int winter)
211 CYG_REPORT_FUNCTION();
212 CYG_REPORT_FUNCARG4X(now, is, the, winter);
216 fn24(int now, int is, int the, int winter, int of)
218 CYG_REPORT_FUNCTION();
219 CYG_REPORT_FUNCARG5X(now, is, the, winter, of);
223 fn25(int now, int is, int the, int winter, int of, int our)
225 CYG_REPORT_FUNCTION();
226 CYG_REPORT_FUNCARG6X(now, is, the, winter, of, our);
230 fn26(int now, int is, int the, int winter, int of, int our, int discontent)
232 CYG_REPORT_FUNCTION();
233 CYG_REPORT_FUNCARG7X(now, is, the, winter, of, our, discontent);
237 fn27(int now, int is, int the, int winter, int of, int our, int discontent, int made)
239 CYG_REPORT_FUNCTION();
240 CYG_REPORT_FUNCARG8X(now, is, the, winter, of, our, discontent, made);
246 CYG_REPORT_FUNCTION();
247 CYG_REPORT_FUNCARG1Y(now);
251 fn29(int now, int is)
253 CYG_REPORT_FUNCTION();
254 CYG_REPORT_FUNCARG2Y(now, is);
258 fn30(int now, int is, int the)
260 CYG_REPORT_FUNCTION();
261 CYG_REPORT_FUNCARG3Y(now, is, the);
265 fn31(int now, int is, int the, int winter)
267 CYG_REPORT_FUNCTION();
268 CYG_REPORT_FUNCARG4Y(now, is, the, winter);
272 fn32(int now, int is, int the, int winter, int of)
274 CYG_REPORT_FUNCTION();
275 CYG_REPORT_FUNCARG5Y(now, is, the, winter, of);
279 fn33(int now, int is, int the, int winter, int of, int our)
281 CYG_REPORT_FUNCTION();
282 CYG_REPORT_FUNCARG6Y(now, is, the, winter, of, our);
286 fn34(int now, int is, int the, int winter, int of, int our, int discontent)
288 CYG_REPORT_FUNCTION();
289 CYG_REPORT_FUNCARG7Y(now, is, the, winter, of, our, discontent);
293 fn35(int now, int is, int the, int winter, int of, int our, int discontent, int made)
295 CYG_REPORT_FUNCTION();
296 CYG_REPORT_FUNCARG8D(now, is, the, winter, of, our, discontent, made);
302 CYG_REPORT_FUNCTION();
303 CYG_REPORT_FUNCARG1D(now);
307 fn37(int now, int is)
309 CYG_REPORT_FUNCTION();
310 CYG_REPORT_FUNCARG2D(now, is);
314 fn38(int now, int is, int the)
316 CYG_REPORT_FUNCTION();
317 CYG_REPORT_FUNCARG3D(now, is, the);
321 fn39(int now, int is, int the, int winter)
323 CYG_REPORT_FUNCTION();
324 CYG_REPORT_FUNCARG4D(now, is, the, winter);
328 fn40(int now, int is, int the, int winter, int of)
330 CYG_REPORT_FUNCTION();
331 CYG_REPORT_FUNCARG5D(now, is, the, winter, of);
335 fn41(int now, int is, int the, int winter, int of, int our)
337 CYG_REPORT_FUNCTION();
338 CYG_REPORT_FUNCARG6D(now, is, the, winter, of, our);
342 fn42(int now, int is, int the, int winter, int of, int our, int discontent)
344 CYG_REPORT_FUNCTION();
345 CYG_REPORT_FUNCARG7D(now, is, the, winter, of, our, discontent);
349 fn43(int now, int is, int the, int winter, int of, int our, int discontent, int made)
351 CYG_REPORT_FUNCTION();
352 CYG_REPORT_FUNCARG8D(now, is, the, winter, of, our, discontent, made);
358 CYG_REPORT_FUNCTION();
359 CYG_REPORT_FUNCARG1XV(now);
363 fn45(int now, int is)
365 CYG_REPORT_FUNCTION();
366 CYG_REPORT_FUNCARG2XV(now, is);
370 fn46(int now, int is, int the)
372 CYG_REPORT_FUNCTION();
373 CYG_REPORT_FUNCARG3XV(now, is, the);
377 fn47(int now, int is, int the, int winter)
379 CYG_REPORT_FUNCTION();
380 CYG_REPORT_FUNCARG4XV(now, is, the, winter);
384 fn48(int now, int is, int the, int winter, int of)
386 CYG_REPORT_FUNCTION();
387 CYG_REPORT_FUNCARG5XV(now, is, the, winter, of);
391 fn49(int now, int is, int the, int winter, int of, int our)
393 CYG_REPORT_FUNCTION();
394 CYG_REPORT_FUNCARG6XV(now, is, the, winter, of, our);
398 fn50(int now, int is, int the, int winter, int of, int our, int discontent)
400 CYG_REPORT_FUNCTION();
401 CYG_REPORT_FUNCARG7XV(now, is, the, winter, of, our, discontent);
405 fn51(int now, int is, int the, int winter, int of, int our, int discontent, int made)
407 CYG_REPORT_FUNCTION();
408 CYG_REPORT_FUNCARG8XV(now, is, the, winter, of, our, discontent, made);
414 CYG_REPORT_FUNCTION();
415 CYG_REPORT_FUNCARG1YV(now);
419 fn53(int now, int is)
421 CYG_REPORT_FUNCTION();
422 CYG_REPORT_FUNCARG2YV(now, is);
426 fn54(int now, int is, int the)
428 CYG_REPORT_FUNCTION();
429 CYG_REPORT_FUNCARG3YV(now, is, the);
433 fn55(int now, int is, int the, int winter)
435 CYG_REPORT_FUNCTION();
436 CYG_REPORT_FUNCARG4YV(now, is, the, winter);
440 fn56(int now, int is, int the, int winter, int of)
442 CYG_REPORT_FUNCTION();
443 CYG_REPORT_FUNCARG5YV(now, is, the, winter, of);
447 fn57(int now, int is, int the, int winter, int of, int our)
449 CYG_REPORT_FUNCTION();
450 CYG_REPORT_FUNCARG6YV(now, is, the, winter, of, our);
454 fn58(int now, int is, int the, int winter, int of, int our, int discontent)
456 CYG_REPORT_FUNCTION();
457 CYG_REPORT_FUNCARG7YV(now, is, the, winter, of, our, discontent);
461 fn59(int now, int is, int the, int winter, int of, int our, int discontent, int made)
463 CYG_REPORT_FUNCTION();
464 CYG_REPORT_FUNCARG8YV(now, is, the, winter, of, our, discontent, made);
470 CYG_REPORT_FUNCTION();
471 CYG_REPORT_FUNCARG1DV(now);
475 fn61(int now, int is)
477 CYG_REPORT_FUNCTION();
478 CYG_REPORT_FUNCARG2DV(now, is);
482 fn62(int now, int is, int the)
484 CYG_REPORT_FUNCTION();
485 CYG_REPORT_FUNCARG3DV(now, is, the);
489 fn63(int now, int is, int the, int winter)
491 CYG_REPORT_FUNCTION();
492 CYG_REPORT_FUNCARG4DV(now, is, the, winter);
496 fn64(int now, int is, int the, int winter, int of)
498 CYG_REPORT_FUNCTION();
499 CYG_REPORT_FUNCARG5DV(now, is, the, winter, of);
503 fn65(int now, int is, int the, int winter, int of, int our)
505 CYG_REPORT_FUNCTION();
506 CYG_REPORT_FUNCARG6DV(now, is, the, winter, of, our);
510 fn66(int now, int is, int the, int winter, int of, int our, int discontent)
512 CYG_REPORT_FUNCTION();
513 CYG_REPORT_FUNCARG7DV(now, is, the, winter, of, our, discontent);
517 fn67(int now, int is, int the, int winter, int of, int our, int discontent, int made)
519 CYG_REPORT_FUNCTION();
520 CYG_REPORT_FUNCARG8DV(now, is, the, winter, of, our, discontent, made);
524 main(int argc, char** argv)
526 CYG_TRACE0(junk, fmt);
527 CYG_TRACE1(junk, fmt, now);
528 CYG_TRACE2(junk, fmt, now, is);
529 CYG_TRACE3(junk, fmt, now, is, the);
530 CYG_TRACE4(junk, fmt, now, is, the, winter);
531 CYG_TRACE5(junk, fmt, now, is, the, winter, of);
532 CYG_TRACE6(junk, fmt, now, is, the, winter, of, our);
533 CYG_TRACE7(junk, fmt, now, is, the, winter, of, our, discontent);
534 CYG_TRACE8(junk, fmt, now, is, the, winter, of, our, discontent, made);
537 CYG_TRACE1B(fmt, now);
538 CYG_TRACE2B(fmt, now, is);
539 CYG_TRACE3B(fmt, now, is, the);
540 CYG_TRACE4B(fmt, now, is, the, winter);
541 CYG_TRACE5B(fmt, now, is, the, winter, of);
542 CYG_TRACE6B(fmt, now, is, the, winter, of, our);
543 CYG_TRACE7B(fmt, now, is, the, winter, of, our, discontent);
544 CYG_TRACE8B(fmt, now, is, the, winter, of, our, discontent, made);
546 CYG_TRACE1X(junk, now);
547 CYG_TRACE2X(junk, now, is);
548 CYG_TRACE3X(junk, now, is, the);
549 CYG_TRACE4X(junk, now, is, the, winter);
550 CYG_TRACE5X(junk, now, is, the, winter, of);
551 CYG_TRACE6X(junk, now, is, the, winter, of, our);
552 CYG_TRACE7X(junk, now, is, the, winter, of, our, discontent);
553 CYG_TRACE8X(junk, now, is, the, winter, of, our, discontent, made);
555 CYG_TRACE1Y(junk, now);
556 CYG_TRACE2Y(junk, now, is);
557 CYG_TRACE3Y(junk, now, is, the);
558 CYG_TRACE4Y(junk, now, is, the, winter);
559 CYG_TRACE5Y(junk, now, is, the, winter, of);
560 CYG_TRACE6Y(junk, now, is, the, winter, of, our);
561 CYG_TRACE7Y(junk, now, is, the, winter, of, our, discontent);
562 CYG_TRACE8Y(junk, now, is, the, winter, of, our, discontent, made);
564 CYG_TRACE1D(junk, now);
565 CYG_TRACE2D(junk, now, is);
566 CYG_TRACE3D(junk, now, is, the);
567 CYG_TRACE4D(junk, now, is, the, winter);
568 CYG_TRACE5D(junk, now, is, the, winter, of);
569 CYG_TRACE6D(junk, now, is, the, winter, of, our);
570 CYG_TRACE7D(junk, now, is, the, winter, of, our, discontent);
571 CYG_TRACE8D(junk, now, is, the, winter, of, our, discontent, made);
573 CYG_TRACE1XV(junk, now);
574 CYG_TRACE2XV(junk, now, is);
575 CYG_TRACE3XV(junk, now, is, the);
576 CYG_TRACE4XV(junk, now, is, the, winter);
577 CYG_TRACE5XV(junk, now, is, the, winter, of);
578 CYG_TRACE6XV(junk, now, is, the, winter, of, our);
579 CYG_TRACE7XV(junk, now, is, the, winter, of, our, discontent);
580 CYG_TRACE8XV(junk, now, is, the, winter, of, our, discontent, made);
582 CYG_TRACE1YV(junk, now);
583 CYG_TRACE2YV(junk, now, is);
584 CYG_TRACE3YV(junk, now, is, the);
585 CYG_TRACE4YV(junk, now, is, the, winter);
586 CYG_TRACE5YV(junk, now, is, the, winter, of);
587 CYG_TRACE6YV(junk, now, is, the, winter, of, our);
588 CYG_TRACE7YV(junk, now, is, the, winter, of, our, discontent);
589 CYG_TRACE8YV(junk, now, is, the, winter, of, our, discontent, made);
591 CYG_TRACE1DV(junk, now);
592 CYG_TRACE2DV(junk, now, is);
593 CYG_TRACE3DV(junk, now, is, the);
594 CYG_TRACE4DV(junk, now, is, the, winter);
595 CYG_TRACE5DV(junk, now, is, the, winter, of);
596 CYG_TRACE6DV(junk, now, is, the, winter, of, our);
597 CYG_TRACE7DV(junk, now, is, the, winter, of, our, discontent);
598 CYG_TRACE8DV(junk, now, is, the, winter, of, our, discontent, made);
601 CYG_TRACE2XB(now, is);
602 CYG_TRACE3XB(now, is, the);
603 CYG_TRACE4XB(now, is, the, winter);
604 CYG_TRACE5XB(now, is, the, winter, of);
605 CYG_TRACE6XB(now, is, the, winter, of, our);
606 CYG_TRACE7XB(now, is, the, winter, of, our, discontent);
607 CYG_TRACE8XB(now, is, the, winter, of, our, discontent, made);
610 CYG_TRACE2YB(now, is);
611 CYG_TRACE3YB(now, is, the);
612 CYG_TRACE4YB(now, is, the, winter);
613 CYG_TRACE5YB(now, is, the, winter, of);
614 CYG_TRACE6YB(now, is, the, winter, of, our);
615 CYG_TRACE7YB(now, is, the, winter, of, our, discontent);
616 CYG_TRACE8YB(now, is, the, winter, of, our, discontent, made);
619 CYG_TRACE2DB(now, is);
620 CYG_TRACE3DB(now, is, the);
621 CYG_TRACE4DB(now, is, the, winter);
622 CYG_TRACE5DB(now, is, the, winter, of);
623 CYG_TRACE6DB(now, is, the, winter, of, our);
624 CYG_TRACE7DB(now, is, the, winter, of, our, discontent);
625 CYG_TRACE8DB(now, is, the, winter, of, our, discontent, made);
628 CYG_TRACE2XVB(now, is);
629 CYG_TRACE3XVB(now, is, the);
630 CYG_TRACE4XVB(now, is, the, winter);
631 CYG_TRACE5XVB(now, is, the, winter, of);
632 CYG_TRACE6XVB(now, is, the, winter, of, our);
633 CYG_TRACE7XVB(now, is, the, winter, of, our, discontent);
634 CYG_TRACE8XVB(now, is, the, winter, of, our, discontent, made);
637 CYG_TRACE2YVB(now, is);
638 CYG_TRACE3YVB(now, is, the);
639 CYG_TRACE4YVB(now, is, the, winter);
640 CYG_TRACE5YVB(now, is, the, winter, of);
641 CYG_TRACE6YVB(now, is, the, winter, of, our);
642 CYG_TRACE7YVB(now, is, the, winter, of, our, discontent);
643 CYG_TRACE8YVB(now, is, the, winter, of, our, discontent, made);
646 CYG_TRACE2DVB(now, is);
647 CYG_TRACE3DVB(now, is, the);
648 CYG_TRACE4DVB(now, is, the, winter);
649 CYG_TRACE5DVB(now, is, the, winter, of);
650 CYG_TRACE6DVB(now, is, the, winter, of, our);
651 CYG_TRACE7DVB(now, is, the, winter, of, our, discontent);
652 CYG_TRACE8DVB(now, is, the, winter, of, our, discontent, made);
669 fn16(11, 12, 13, 14, 15);
670 fn17(16, 17, 18, 19, 20, 21);
671 fn18(22, 23, 24, 25, 26, 27, 28);
672 fn19(29, 30, 31, 32, 33, 34, 35, 36);
677 fn24(11, 12, 13, 14, 15);
678 fn25(16, 17, 18, 19, 20, 21);
679 fn26(22, 23, 24, 25, 26, 27, 28);
680 fn27(29, 30, 31, 32, 33, 34, 35, 36);
685 fn32(11, 12, 13, 14, 15);
686 fn33(16, 17, 18, 19, 20, 21);
687 fn34(22, 23, 24, 25, 26, 27, 28);
688 fn35(29, 30, 31, 32, 33, 34, 35, 36);
693 fn40(11, 12, 13, 14, 15);
694 fn41(16, 17, 18, 19, 20, 21);
695 fn42(22, 23, 24, 25, 26, 27, 28);
696 fn43(29, 30, 31, 32, 33, 34, 35, 36);
701 fn48(11, 12, 13, 14, 15);
702 fn49(16, 17, 18, 19, 20, 21);
703 fn50(22, 23, 24, 25, 26, 27, 28);
704 fn51(29, 30, 31, 32, 33, 34, 35, 36);
709 fn56(11, 12, 13, 14, 15);
710 fn57(16, 17, 18, 19, 20, 21);
711 fn58(22, 23, 24, 25, 26, 27, 28);
712 fn59(29, 30, 31, 32, 33, 34, 35, 36);
717 fn64(11, 12, 13, 14, 15);
718 fn65(16, 17, 18, 19, 20, 21);
719 fn66(22, 23, 24, 25, 26, 27, 28);
720 fn67(29, 30, 31, 32, 33, 34, 35, 36);
722 CYG_TEST_PASS_FINISH("disabled tracing does nothing");