📄 ttrace1.cxx
字号:
//==========================================================================
//
// ttrace1.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: By default all tracing should be disabled, but
// they should compile just fine. This module uses all
// of the trace macros. As a fringe benefit, all
// of the macros get checked for correct argument usage.
//
//####DESCRIPTIONEND####
//==========================================================================
#include <cyg/infra/testcase.h>
#include <cyg/infra/cyg_trac.h>
#include <cstdlib>
#ifdef CYGDBG_USE_TRACING
# error Tracing should not be enabled by default.
#endif
#ifdef CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS
# error Function reporting should not be enabled by default.
#endif
#define CYG_TRACE_USER_BOOL (invalid_expression)
#define CYG_REPORT_USER_BOOL (invalid_expression)
void
fn1(void)
{
CYG_REPORT_FUNCTION();
}
void
fn2(void)
{
CYG_REPORT_FUNCTYPE("printf-style format string");
}
void
fn3(void)
{
CYG_REPORT_FUNCNAME("fn3");
}
void
fn4(void)
{
CYG_REPORT_FUNCNAMETYPE("fn4", "printf-style format string");
}
void
fn5(void)
{
CYG_REPORT_FUNCTIONC();
}
void
fn6(void)
{
CYG_REPORT_FUNCTYPEC("printf-style format string");
}
void
fn7(void)
{
CYG_REPORT_FUNCNAMEC("fn7");
}
void
fn8(void)
{
CYG_REPORT_FUNCNAMETYPEC("fn8", "printf-style format string");
}
void
fn9(void)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_RETURN();
}
void
fn10(void)
{
CYG_REPORT_FUNCTYPE("result is %d");
CYG_REPORT_RETVAL(42);
}
void
fn11(void)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARGVOID();
}
void
fn12(int now)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG1(fmt, now);
}
void
fn13(int now, int is)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG2(fmt, now, is);
}
void
fn14(int now, int is, int the)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG3(fmt, now, is, the);
}
void
fn15(int now, int is, int the, int winter)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG4(fmt, now, is, the, winter);
}
void
fn16(int now, int is, int the, int winter, int of)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG5(fmt, now, is, the, winter, of);
}
void
fn17(int now, int is, int the, int winter, int of, int our)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG6(fmt, now, is, the, winter, of, our);
}
void
fn18(int now, int is, int the, int winter, int of, int our, int discontent)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG7(fmt, now, is, the, winter, of, our, discontent);
}
void
fn19(int now, int is, int the, int winter, int of, int our, int discontent, int made)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG8(fmt, now, is, the, winter, of, our, discontent, made);
}
void
fn20(int now)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG1X(now);
}
void
fn21(int now, int is)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG2X(now, is);
}
void
fn22(int now, int is, int the)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG3X(now, is, the);
}
void
fn23(int now, int is, int the, int winter)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG4X(now, is, the, winter);
}
void
fn24(int now, int is, int the, int winter, int of)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG5X(now, is, the, winter, of);
}
void
fn25(int now, int is, int the, int winter, int of, int our)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG6X(now, is, the, winter, of, our);
}
void
fn26(int now, int is, int the, int winter, int of, int our, int discontent)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG7X(now, is, the, winter, of, our, discontent);
}
void
fn27(int now, int is, int the, int winter, int of, int our, int discontent, int made)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG8X(now, is, the, winter, of, our, discontent, made);
}
void
fn28(int now)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG1Y(now);
}
void
fn29(int now, int is)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG2Y(now, is);
}
void
fn30(int now, int is, int the)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG3Y(now, is, the);
}
void
fn31(int now, int is, int the, int winter)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG4Y(now, is, the, winter);
}
void
fn32(int now, int is, int the, int winter, int of)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG5Y(now, is, the, winter, of);
}
void
fn33(int now, int is, int the, int winter, int of, int our)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG6Y(now, is, the, winter, of, our);
}
void
fn34(int now, int is, int the, int winter, int of, int our, int discontent)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG7Y(now, is, the, winter, of, our, discontent);
}
void
fn35(int now, int is, int the, int winter, int of, int our, int discontent, int made)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG8D(now, is, the, winter, of, our, discontent, made);
}
void
fn36(int now)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG1D(now);
}
void
fn37(int now, int is)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG2D(now, is);
}
void
fn38(int now, int is, int the)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG3D(now, is, the);
}
void
fn39(int now, int is, int the, int winter)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG4D(now, is, the, winter);
}
void
fn40(int now, int is, int the, int winter, int of)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG5D(now, is, the, winter, of);
}
void
fn41(int now, int is, int the, int winter, int of, int our)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG6D(now, is, the, winter, of, our);
}
void
fn42(int now, int is, int the, int winter, int of, int our, int discontent)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG7D(now, is, the, winter, of, our, discontent);
}
void
fn43(int now, int is, int the, int winter, int of, int our, int discontent, int made)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG8D(now, is, the, winter, of, our, discontent, made);
}
void
fn44(int now)
{
CYG_REPORT_FUNCTION();
CYG_REPORT_FUNCARG1XV(now);
}
void
fn45(int now, int is)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -