当前位置:网站首页>Unable to find sygwin.s file during vscode debugging
Unable to find sygwin.s file during vscode debugging
2022-07-26 04:16:00 【One reed to sail FP】
Recently written C Code , use vscode During debugging , Found a new error . There is no problem with the program running , But there will be errors when debugging , Pop-up window :

After many inquiries , This error may be caused by defining a variable length array , The array is too large, causing stack overflow , as well as gdb Debugger support for variable length arrays is not very good . But I don't define large arrays myself , So the reason is the latter .
Use the following test code :
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
int n;
scanf("%d", &n);
int a[n]; // The breakpoint is set here
memset(a, 0, sizeof(a));
int i = 0;
for(i=0; i<n; i++){
printf("%d ", a[i]);
}
return 0;
}
The breakpoint is set at the declaration of variable length array , This error will still appear on this line , Debugging forced to stop .
Two solutions have been found :
1、 Modify breakpoints , Place the breakpoint after the variable length array declaration , This problem will no longer occur .
2、 Do not use variable length arrays , Instead, use dynamic memory allocation to declare dynamic arrays , The position of the breakpoint remains unchanged , It can also solve problems .
边栏推荐
- `Oi problem solving ` ` leetcode '2040. The k-th minor product of two ordered arrays
- 远坂凛壁纸
- 智装时代已来,智哪儿邀您一同羊城论剑,8月4日,光亚展恭候
- Overview of wavelet packet transform methods
- Apisex's exploration in the field of API and microservices
- VM虚拟机 没有未桥接的主机网络适配器 无法还原默认配置
- 解决:RuntimeError: Expected object of scalar type Int but got scalar type Double
- Chapter 18: explore the wonders of the mean in the 2-bit a~b system, specify the 3x+1 conversion process of integers, specify an interval to verify the angular Valley conjecture, explore the number of
- [SVN] please execute the 'cleanup' command appears all the time. The solution is that there is no response after cleanup
- How to write abstract in English thesis?
猜你喜欢

How to build an enterprise level OLAP data engine for massive data and high real-time requirements?

吴恩达机器学习课后习题——逻辑回归

零售连锁门店收银系统源码管理商品分类的功能逻辑分享

Retail chain store cashier system source code management commodity classification function logic sharing

(translation) timing of website flow chart and user flow chart

Life related - ten years of career experience (turn)

What are the duplicate check rules for English papers?

Firewall command simple operation
![Matrix and Gauss elimination [matrix multiplication, Gauss elimination, solving linear equations, solving determinants] the most detailed in the whole network, with examples and sister chapters of 130](/img/84/e5cb5199fe4602440b50dfc4afe963.gif)
Matrix and Gauss elimination [matrix multiplication, Gauss elimination, solving linear equations, solving determinants] the most detailed in the whole network, with examples and sister chapters of 130

1. Mx6u-alpha development board (main frequency and clock configuration experiment)
随机推荐
Huawei issued another global convening order of "genius youth", and some people once gave up their annual salary of 3.6 million to join
LeetCode. 6115 count the number of ideal arrays
Where does international crude oil open an account, a formal, safe and secure platform
SEGGER Embedded Studio找不到xxx.c或者xxx.h文件
Acwing_12. 背包问题求具体方案_dp
Helloworld案例分析
Laravel8 implements interface authentication encapsulation using JWT
荐书|《DBT技巧训练手册》:宝贝,你就是你活着的原因
红星美凯龙高负债之下,盯上新能源了?
What format should be adopted when the references are foreign documents?
解决:RuntimeError: Expected object of scalar type Int but got scalar type Double
Day24 job
Firewall command simple operation
Operator new, operator delete supplementary handouts
Basic principles of iptables
如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?
Segger embedded studio cannot find xxx.c or xxx.h file
What are the duplicate check rules for English papers?
[in depth study of 4g/5g/6g topic-42]: urllc-13 - in depth interpretation of 3GPP urllc related protocols, specifications and technical principles -7-low delay technology-1-subcarrier spacing expansio
Seat / safety configuration upgrade is the administrative experience of the new Volvo S90 in place