Can';t使用gdb进入printf函数

Can';t使用gdb进入printf函数,c,gdb,clion,C,Gdb,Clion,我无法使用gdb进入printf函数。我使用的是CLion,每次我点击“跨入”、“跨过”或“强制跨入”,都会返回同一行,最终退出程序 我对程序进行了最低限度的优化: CC=gcc CFLAGS=-Wall -ggdb -O0 -g3 OBJECTS=main.c permute: $(OBJECTS) $(CC) $(CFLAGS) $(OBJECTS) -o permute clean: rm $(OBJECTS) permute 我还在控制台上使用了stepi。有什么问

我无法使用gdb进入
printf
函数。我使用的是CLion,每次我点击“跨入”、“跨过”或“强制跨入”,都会返回同一行,最终退出程序

我对程序进行了最低限度的优化:

CC=gcc
CFLAGS=-Wall -ggdb -O0 -g3
OBJECTS=main.c

permute: $(OBJECTS)
    $(CC) $(CFLAGS) $(OBJECTS) -o permute

clean:
    rm $(OBJECTS) permute
我还在控制台上使用了
stepi
。有什么问题

编辑:

启动gdb时,我收到以下消息:

>>>>>Function "__cxa_throw" not defined.
warning: Could not open OSO archive file "/BinaryCache/corecrypto/corecrypto-233.1.2~26/Symbols/BuiltProducts/libcorecrypto_static.a"
warning: `/BinaryCache/coreTLS/coreTLS-35.20.2~10/Objects/coretls.build/coretls.build/Objects-normal/x86_64/system_coretls_vers.o': can't open to read symbols: No such file or directory.
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.20.2~10/Symbols/BuiltProducts/libcoretls_ciphersuites.a"
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.20.2~10/Symbols/BuiltProducts/libcoretls_handshake.a"
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.20.2~10/Symbols/BuiltProducts/libcoretls_record.a"
warning: Could not open OSO archive file "/BinaryCache/coreTLS/coreTLS-35.20.2~10/Symbols/BuiltProducts/libcoretls_stream_parser.a"
完整代码:

#include <stdio.h>


/* Function to swap values at two pointers */
void swap (char *x, char *y)
{
    char temp;
    temp = *x;
    *x = *y;
    *y = temp;
}

/* Function to print permutations of string
    This function takes three parameters:
    1. String
    2. Starting index of the string
    3. Ending index of the string. */
void permute(char *a, int i, int n)
{
    int j;
    if (i == n)
        printf("%s\n", a);
    else
    {
        for (j = i; j <= n; j++)
        {
            swap((a+i), (a+j));
            permute(a, i+1, n);
            swap((a+i), (a+j)); //backtrack
        }
    }
}

/* Driver program to test above functions */
int main()
{
    char a[] = "ABC";
    permute(a, 0, 2);
    getchar();
    return 0;
}
#包括
/*函数在两个指针处交换值*/
无效交换(字符*x,字符*y)
{
焦炭温度;
温度=*x;
*x=*y;
*y=温度;
}
/*用于打印字符串排列的函数
此函数采用三个参数:
1.一串
2.字符串的起始索引
3.字符串的结束索引*/
无效排列(字符*a,整数i,整数n)
{
int j;
如果(i==n)
printf(“%s\n”,a);
其他的
{

对于(j=i;j不,它不是重复的。它没有回答我的问题。给出的答案是使用“stepi”。我在问题中注意到,我已经尝试过了,但它不起作用。printf是标准库的一部分,您的编译标志不会影响已编译的库。gdb是否会在启动时抱怨缺少符号?请尝试安装libc调试符号。这可以由yum或apt get完成,具体取决于您的发行版。为什么要安装libc调试符号进入
printf(3)
?正如您所知,在
printf(3)
内部发生stacktrace终止的崩溃并不意味着这是一个libc错误。这可能是您的代码。@FilipeGonçalves这不是我的代码