当前位置: 首页>>代码示例>>C++>>正文


C++ printf_stderr_common函数代码示例

本文整理汇总了C++中printf_stderr_common函数的典型用法代码示例。如果您正苦于以下问题:C++ printf_stderr_common函数的具体用法?C++ printf_stderr_common怎么用?C++ printf_stderr_common使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了printf_stderr_common函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: WTFReportFatalError

void WTFReportFatalError(const char* file, int line, const char* function, const char* format, ...)
{
    va_list args;
    va_start(args, format);
    vprintf_stderr_with_prefix("FATAL ERROR: ", format, args);
    va_end(args);
    printf_stderr_common("\n");
    printCallSite(file, line, function);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:9,代码来源:Assertions.cpp

示例2: WTFReportAssertionFailureWithMessage

void WTFReportAssertionFailureWithMessage(const char* file, int line, const char* function, const char* assertion, const char* format, ...)
{
    va_list args;
    va_start(args, format);
    vprintf_stderr_with_prefix("ASSERTION FAILED: ", format, args);
    va_end(args);
    printf_stderr_common("\n%s\n", assertion);
    printCallSite(file, line, function);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:9,代码来源:Assertions.cpp

示例3: printCallSite

static void printCallSite(const char* file, int line, const char* function)
{
#if OS(WINDOWS) && !OS(WINCE) && defined(_DEBUG)
    _CrtDbgReport(_CRT_WARN, file, line, NULL, "%s\n", function);
#else
    // By using this format, which matches the format used by MSVC for compiler errors, developers
    // using Visual Studio can double-click the file/line number in the Output Window to have the
    // editor navigate to that line of code. It seems fine for other developers, too.
    printf_stderr_common("%s(%d) : %s\n", file, line, function);
#endif
}
开发者ID:sfarbotka,项目名称:py3webkit,代码行数:11,代码来源:Assertions.cpp

示例4: WTFPrintBacktrace

void WTFPrintBacktrace(void** stack, int size)
{
    for (int i = 0; i < size; ++i) {
        const char* mangledName = 0;
        char* cxaDemangled = 0;
#if OS(MACOSX) || OS(LINUX)
        Dl_info info;
        if (dladdr(stack[i], &info) && info.dli_sname)
            mangledName = info.dli_sname;
        if (mangledName)
            cxaDemangled = abi::__cxa_demangle(mangledName, 0, 0, 0);
#endif
        const int frameNumber = i + 1;
        if (mangledName || cxaDemangled)
            printf_stderr_common("%-3d %p %s\n", frameNumber, stack[i], cxaDemangled ? cxaDemangled : mangledName);
        else
            printf_stderr_common("%-3d %p\n", frameNumber, stack[i]);
        free(cxaDemangled);
    }
}
开发者ID:Igalia,项目名称:blink,代码行数:20,代码来源:Assertions.cpp

示例5: WTFLog

void WTFLog(WTFLogChannel* channel, const char* format, ...)
{
    if (channel->state != WTFLogChannelOn)
        return;

    va_list args;
    va_start(args, format);
    vprintf_stderr_common(format, args);
    va_end(args);
    if (format[strlen(format) - 1] != '\n')
        printf_stderr_common("\n");
}
开发者ID:freeworkzz,项目名称:nook-st-oss,代码行数:12,代码来源:Assertions.cpp

示例6: WTFLogVerbose

void WTFLogVerbose(const char* file, int line, const char* function, WTFLogChannel* channel, const char* format, ...)
{
    if (channel->state != WTFLogChannelOn)
        return;

    va_list args;
    va_start(args, format);
    vprintf_stderr_common(format, args);
    va_end(args);
    if (format[strlen(format) - 1] != '\n')
        printf_stderr_common("\n");
    printCallSite(file, line, function);
}
开发者ID:freeworkzz,项目名称:nook-st-oss,代码行数:13,代码来源:Assertions.cpp

示例7: WTFLog

void WTFLog(WTFLogChannel* channel, const char* format, ...)
{
    if (channel->state != WTFLogChannelOn)
        return;

    va_list args;
    va_start(args, format);
    vprintf_stderr_common(false, format, args);
    va_end(args);
    
    size_t formatLength = strlen(format);
    if (formatLength && format[formatLength - 1] != '\n')
        printf_stderr_common(false, "\n");
}
开发者ID:emuikernel,项目名称:EAWebKit,代码行数:14,代码来源:Assertions.cpp

示例8: WTFReportArgumentAssertionFailure

void WTFReportArgumentAssertionFailure(const char* file, int line, const char* function, const char* argName, const char* assertion)
{
    printf_stderr_common("ARGUMENT BAD: %s, %s\n", argName, assertion);
    printCallSite(file, line, function);
}
开发者ID:sfarbotka,项目名称:py3webkit,代码行数:5,代码来源:Assertions.cpp

示例9: ReportBrollyionFailureWithMessage

void ReportBrollyionFailureWithMessage(const char* file, int line, const char* function, const char *message)
{
	printf_stderr_common("ASSERTION FAILED: %s\n", message);
    printCallSite(file, line, function);
}
开发者ID:vilkov,项目名称:brolly,代码行数:5,代码来源:brolly_report.cpp

示例10: ReportSegmentationFault

void ReportSegmentationFault(void *address, int ip)
{
    printf_stderr_common("SEGMENTATION FAULT: faulty address is %p, from 0x%x\n", address, ip);
}
开发者ID:vilkov,项目名称:brolly,代码行数:4,代码来源:brolly_report.cpp


注:本文中的printf_stderr_common函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。