📄 ttrace2.cxx
字号:
//==========================================================================//// ttrace2.cxx//// Trace test case ////==========================================================================//####COPYRIGHTBEGIN####// // ----------------------------------------------------------------------------// Copyright (C) 1999, 2000 Red Hat, Inc.//// This file is part of the eCos host tools.//// This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free // Software Foundation; either version 2 of the License, or (at your option) // any later version.// // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for // more details.// // You should have received a copy of the GNU General Public License along with// this program; if not, write to the Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.//// ----------------------------------------------------------------------------// //####COPYRIGHTEND####//==========================================================================//#####DESCRIPTIONBEGIN#### //// Author(s): bartv// Contributors: bartv// Date: 1999-01-06// Purpose:// Description: This file tests all the trace macros for the case// where tracing and function reporting are enabled.////####DESCRIPTIONEND####//==========================================================================#define CYGDBG_USE_TRACING#define CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS#include <cyg/infra/testcase.h>#include <cyg/infra/cyg_trac.h>#include <cstdlib>bool tracing_is_enabled(void);bool reporting_is_enabled(void);#define CYG_TRACE_USER_BOOL (tracing_is_enabled())#define CYG_REPORT_USER_BOOL (reporting_is_enabled())voidfn1(void){ CYG_REPORT_FUNCTION();}voidfn2(void){ CYG_REPORT_FUNCTYPE("printf-style format string");}voidfn3(void){ CYG_REPORT_FUNCNAME("fn3");}voidfn4(void){ CYG_REPORT_FUNCNAMETYPE("fn4", "printf-style format string");}voidfn5(void){ CYG_REPORT_FUNCTIONC();}voidfn6(void){ CYG_REPORT_FUNCTYPEC("printf-style format string");}voidfn7(void){ CYG_REPORT_FUNCNAMEC("fn7");}voidfn8(void){ CYG_REPORT_FUNCNAMETYPEC("fn8", "printf-style format string");}voidfn9(void){ CYG_REPORT_FUNCTION(); CYG_REPORT_RETURN();}voidfn10(void){ CYG_REPORT_FUNCTYPE("result is %d"); CYG_REPORT_RETVAL(42);}voidfn11(void){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARGVOID();}voidfn12(int glorious){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG1("%d", glorious);}voidfn13(int glorious, int summer){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG2("%d %d", glorious, summer);}voidfn14(int glorious, int summer, int by){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG3("%d %d %d", glorious, summer, by);}voidfn15(int glorious, int summer, int by, int thisse){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG4("%d %d %d %d", glorious, summer, by, thisse);}voidfn16(int glorious, int summer, int by, int thisse, int son){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG5("%d %d %d %d %d", glorious, summer, by, thisse, son);}voidfn17(int glorious, int summer, int by, int thisse, int son, int of){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG6("%d %d %d %d %d %d", glorious, summer, by, thisse, son, of);}voidfn18(int glorious, int summer, int by, int thisse, int son, int of, int york){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG7("%d %d %d %d %d %d %d", glorious, summer, by, thisse, son, of, york);}voidfn19(int glorious, int summer, int by, int thisse, int son, int of, int york, int stop){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG8("%d %d %d %d %d %d %d %d", glorious, summer, by, thisse, son, of, york, stop);}voidfn20(int glorious){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG1X(glorious);}voidfn21(int glorious, int summer){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG2X(glorious, summer);}voidfn22(int glorious, int summer, int by){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG3X(glorious, summer, by);}voidfn23(int glorious, int summer, int by, int thisse){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG4X(glorious, summer, by, thisse);}voidfn24(int glorious, int summer, int by, int thisse, int son){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG5X(glorious, summer, by, thisse, son);}voidfn25(int glorious, int summer, int by, int thisse, int son, int of){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG6X(glorious, summer, by, thisse, son, of);}voidfn26(int glorious, int summer, int by, int thisse, int son, int of, int york){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG7X(glorious, summer, by, thisse, son, of, york);}voidfn27(int glorious, int summer, int by, int thisse, int son, int of, int york, int stop){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG8X(glorious, summer, by, thisse, son, of, york, stop);}voidfn28(int glorious){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG1Y(glorious);}voidfn29(int glorious, int summer){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG2Y(glorious, summer);}voidfn30(int glorious, int summer, int by){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG3Y(glorious, summer, by);}voidfn31(int glorious, int summer, int by, int thisse){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG4Y(glorious, summer, by, thisse);}voidfn32(int glorious, int summer, int by, int thisse, int son){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG5Y(glorious, summer, by, thisse, son);}voidfn33(int glorious, int summer, int by, int thisse, int son, int of){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG6Y(glorious, summer, by, thisse, son, of);}voidfn34(int glorious, int summer, int by, int thisse, int son, int of, int york){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG7Y(glorious, summer, by, thisse, son, of, york);}voidfn35(int glorious, int summer, int by, int thisse, int son, int of, int york, int stop){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG8D(glorious, summer, by, thisse, son, of, york, stop);}voidfn36(int glorious){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG1D(glorious);}voidfn37(int glorious, int summer){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG2D(glorious, summer);}voidfn38(int glorious, int summer, int by){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG3D(glorious, summer, by);}voidfn39(int glorious, int summer, int by, int thisse){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG4D(glorious, summer, by, thisse);}voidfn40(int glorious, int summer, int by, int thisse, int son){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG5D(glorious, summer, by, thisse, son);}voidfn41(int glorious, int summer, int by, int thisse, int son, int of){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG6D(glorious, summer, by, thisse, son, of);}voidfn42(int glorious, int summer, int by, int thisse, int son, int of, int york){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG7D(glorious, summer, by, thisse, son, of, york);}voidfn43(int glorious, int summer, int by, int thisse, int son, int of, int york, int stop){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG8D(glorious, summer, by, thisse, son, of, york, stop);}voidfn44(int glorious){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG1XV(glorious);}voidfn45(int glorious, int summer){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG2XV(glorious, summer);}voidfn46(int glorious, int summer, int by){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG3XV(glorious, summer, by);}voidfn47(int glorious, int summer, int by, int thisse){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG4XV(glorious, summer, by, thisse);}voidfn48(int glorious, int summer, int by, int thisse, int son){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG5XV(glorious, summer, by, thisse, son);}voidfn49(int glorious, int summer, int by, int thisse, int son, int of){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG6XV(glorious, summer, by, thisse, son, of);}voidfn50(int glorious, int summer, int by, int thisse, int son, int of, int york){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG7XV(glorious, summer, by, thisse, son, of, york);}voidfn51(int glorious, int summer, int by, int thisse, int son, int of, int york, int stop){ CYG_REPORT_FUNCTION(); CYG_REPORT_FUNCARG8XV(glorious, summer, by, thisse, son, of, york, stop);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -