gpt4 book ai didi

c - GDB一直崩溃

转载 作者:太空宇宙 更新时间:2023-11-04 04:50:55 28 4
gpt4 key购买 nike

我的程序正在经历一个无限循环,我正试图找出原因。 (这不是我要问的)。我通常会去 GDB 找出问题所在,但实际上在我的程序开始时它一直崩溃并显示此消息。

__strcmp_ia32 () 位于 ../sysdeps/i386/i686/multiarch/../strcmp.S:34

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

//Prototypes and linked lists here

int debugMode(int argc, char** argv)
{
if(strcmp(argv[argc-1], "-d") == 0) // GDB stops right here.
return 1;

else
return 0;
}

int main(int argc, char** argv)
{
int debug, integer;
char choice;
node *head = NULL;
node *current;

debug = debugMode(argc, argv);
// stuff here
}

请记住,我确实有一个函数原型(prototype)。感谢您的帮助。

编辑:顺便说一句,我不会发送任何参数。我正在使用重定向来找出导致我的程序执行无限循环的原因。

最佳答案

keeps crashing with this message.

__strcmp_ia32 () at ../sysdeps/i386/i686/multiarch/../strcmp.S:34

您的 glibc 版本有这个(最近已修复)错误:http://sourceware.org/bugzilla/show_bug.cgi?id=13786

(注意:sourceware.org 本周因硬件升级而关闭,如果您“无法访问”,请稍后再试。)

关于c - GDB一直崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15473427/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com