gcc 内置宏配合调试

/*
 * test.c
 */
#include <stdio.h>

int main(int argc, char **argv)
{
    printf("[%s:%d]%s\n", __FILE__, __LINE__,__FUNCTION__);
    printf("[%s:%d]%s\n", __FILE__, __LINE__,__FUNCTION__);
    printf("[%s:%d]%s\n", __FILE__, __LINE__,__FUNCTION__);
    printf("[%s:%d]%s\n", __FILE__, __LINE__,__FUNCTION__);
    printf("[%s:%d]%s\n", __FILE__, __LINE__,__FUNCTION__);
    return 0;
}
</stdio.h>
[test.c:5]main 
[test.c:6]main 
[test.c:7]main 
[test.c:8]main 
[test.c:9]main

你可能感兴趣的:(function,gcc,File)