当前位置:网站首页>Vscode ROS configuration GDB debugging error record
Vscode ROS configuration GDB debugging error record
2022-07-28 22:37:00 【TwilightZrui】
problem 1:VSCode Debugging failed to open glibc Library “raise.c“ or “abort.c“ And other files
vscode Report errors :
Unable to open 'nanosleep.c': Unable to read file '/build/glibc-uZu3wS/glibc-2.27/sysdeps/unix/sysv/linux/nanosleep.c' (Error: Unable to resolve non-existing file '/build/glibc-uZu3wS/glibc-2.27/sysdeps/unix/sysv/linux/nanosleep.c').

solve :
sudo apt install glibc-source
cd /usr/src/glibc
sudo tar xvf glibc-2.31.tar.xz
stay launch.json Medium "configurations" Add below
"sourceFileMap": {
"/build/glibc-YYA7BZ": "/usr/src/glibc"
}
among "YYA7BZ" It should be changed to the one shown in the error message glibc suffix
problem 2:terminate called after throwing an instance of ‘std::runtime_error’
vscode Report errors
terminate called after throwing an instance of 'std::runtime_error'
what(): Duration is out of dual 32-bit range
At the same time, the call stack error is displayed

reason :
The variable value in the call stack is out of bounds , The reason is that this debugging uses a single node gdb debugging , No load ROS Launch Medium yaml file , So many variables are not initialized , It will cross the boundary during use , So there is a stack call error .
solve :
Switch to a launch gdb debugging , take yaml File loading into program .
The modified launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ROS: Launch",
"type": "ros",
"request": "launch",
"target": "/home/twilight/project/robot/Foothold_ws/src/foothold_planner/foothold_planner/launch/foothold_planner.launch"
},
{
"name": "ROS: Attach",
"type": "ros",
"request": "attach"
},
{
"name": "(gdb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "enter program name, for example ${workspaceFolder}/a.out",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/devel/lib/foothold_planner/foothold_planner_node",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"sourceFileMap": {
"/build/glibc-uZu3wS": "/usr/src/glibc"
}
}
]
}
边栏推荐
- Solve the problem that TS node xxx.ts executes TS code and reports errors
- Use webworker to perform background tasks
- Paddlenlp is based on ernir3.0 text classification. Take the crime prediction task of cail2018-small dataset as an example [multiple tags]
- 76. Minimum coverage substring (hard sliding window hash table string)
- Mysql8.0 cannot authorize users or prompt you are not allowed to create a user with grant
- Chrome encountered a problem when debugging the code. After modifying and saving the code in vscode, chrome did not update after refreshing
- 使用webWorker执行后台任务
- Netease Yunxin 2022q2 product supply station, come and get your product supply plan!
- Ruiji takeout project - development of business development function Day2
- Sword finger offer II 067. maximum XOR (medium prefix tree bit operation array)
猜你喜欢

Ultra detailed visual studio 2019 running littlevgl (lvgl) simulator

npm ERR code ETIMEDOUT npm ERR syscall connect npm ERR errno ETIMEDOUT npm ERR network reques...

Less than a year after its establishment! MIT derivative quantum computing company completed financing of US $9million

成立不到一年!MIT衍生量子计算公司完成900万美元融资

静态成员static详解

LCR测试仪最为主要的功能和用途都是什么
![[Ruiji takeout project] Day5 - Chapter 6 mobile verification code login](/img/53/c578e0d1428ea569fb412a20019924.png)
[Ruiji takeout project] Day5 - Chapter 6 mobile verification code login

Qt+FFmpeg环境搭建

使用PCL批量将点云.bin文件转.pcd

Concise history of graphic technology
随机推荐
Ruiji takeout - background login function development
二进制的原码、反码、补码
Openresty request authentication
DOM programming + events
log4j漏洞 elk平台 处理方法 (logstah5.5.1)
NPM switch Taobao source (NPM source)
SQL injection less34 (post wide byte injection + Boolean blind injection)
winServer运维技术栈
internet的基本服务中文件传输命令是哪个
纪念一下第一次写的线段树了喽(对应洛谷3372)
Using nodejs to operate MySQL
Sword finger offer II 066. sum of words (medium prefix tree design string)
基于Ernie-3.0 CAIL2019法研杯要素识别多标签分类任务
使用PCL批量显示PCD点云数据流
微信小程序剪切图片的功能
[binary tree] pseudo palindrome path in binary tree
Static details of static members
Netease Yunxin 2022q2 product supply station, come and get your product supply plan!
CMD common commands
LVS+KeepAlived高可用部署实战应用