cpp coredump 记录汇总

2023/07/14 cpp cpp coredump 共 325 字,约 1 分钟
后端编程指北

c++ core 记录汇总

format core

类似传入参数位置和格式错误

    void SetFailed(int error_code, const char* reason_fmt, ...)
        __attribute__ ((__format__ (__printf__, 3, 4)));

    ctx->server_cntl->SetFailed(client_cntl->ErrorCode(), "%s", client_cntl->ErrorText().c_str());

测试例子

#include <stdio.h>
int main()
{
    int i = 0;
    while (i < 10)
    {
        printf("%d%p%s");
        i++;
    }
    
    return 0;
}

文档信息

Search

    Table of Contents