gpt4 book ai didi

c - 在 Clion 2017.3.4 中调试时的反汇编 View - 这意味着什么?

转载 作者:行者123 更新时间:2023-11-30 16:32:38 40 4
gpt4 key购买 nike

我目前在 C99 中使用 Clion 2017.3.4。

在尝试运行和调试我的程序时,调试器跳转到“反汇编 View ”,我想知道问题是什么。

基本上,该函数获取季节(类型)、输入字符串(season_info)和索引,该索引指向输入字符串中的不同位置。

该函数应以整数形式返回年份,而输入为字符串

当我进入 free() 行时,会显示反汇编 View 。有什么想法是什么问题吗?反汇编 View 一般意味着什么?

int GetSeasonYear(Season season, const char* season_info, int *index){ 

char* tmp_str = GetStringByLine(season_info, index);
if(tmp_str == NULL){
SeasonDestroy(season);
return 0;
}

season->season_year = atoi(tmp_str);
free(tmp_str);

return 1;

}

这是 GetSeasonYear 函数内部使用的函数(尽管我检查过并且工作正常)。

char* GetStringByLine(const char* season_info, int* index){ // change back to static

int i = 0;

while(season_info[i] != '\n'){
i++;
}

char* tmp_str = malloc(sizeof(char)*(i+1));
if(tmp_str == NULL){
return NULL;
}

memcpy(tmp_str, season_info, sizeof(char)*i);
tmp_str[i+1]='\0';

*index = i;

return tmp_str;

}

谢谢

最佳答案

您正在进入一个函数(免费),您可以a) 没有来源或者b) 有源代码,但调试器无法找到它。

关于c - 在 Clion 2017.3.4 中调试时的反汇编 View - 这意味着什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50064635/

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