microsoft / microsoft/vscode-cpptools
expression breakpoint not working as expected
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 6.2k
- Fork
- 1.7k
- Merge trung bình
- 14 giờ 46 phút
- Pull request đã merge (30 ngày)
- 61
Mô tả
Environment
- OS and version: Ubuntu 20.04.4 LTS
- VS Code: 1.68.0
- C/C++ extension: 1.10.7
- OS and version of remote machine (if applicable): both on local linux and remote to linux(from mac or win),but local mac and win is working as expected
- GDB / LLDB version:9.2
Bug Summary and Steps to Reproduce
Bug Summary:
If I use expression breakpoint and expression contains strcmp, when this breakpoint is hit, gdb will crash unexpectedly

Steps to reproduce:
- Only on Linux environment(both local and remote to it via remote-ssh), it works well on local windows environment
- Just a demo project will reproduce this issue
Besides, if I don't use strcmp and just set very simple expression like 1==1, breakpoint will be hit successfully and there's no error.
Sorry to let you guys work on this, looking forward to your reply.
Debugger Configurations
{
// 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": "C++ Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
"stopAtEntry": false,
"cwd": ".",
"launchCompleteCommand": "exec-run",
"linux": {
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb"
},
"preLaunchTask": "default compile",
"externalConsole": false
}
]
}
Debugger Logs
Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.
Breakpoint 1, main () at /home/eric/Dev/c-test/test.c:5
5 {
Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Symbols loaded.
ERROR: GDB exited unexpectedly. Debugging will now abort.
The program '/home/eric/Dev/c-test/test.exe' has exited with code -1 (0xffffffff).
Other Extensions
Other extensions have been disabled when I test on this
Additional Information
No response
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi từ test.c với cấu hình khởi chạy được cung cấp trên Linux bằng GDB 9.2, so sánh một biểu thức chứa strcmp với 1==1. Sử dụng nhật ký của trình gỡ lỗi để xác định lý do GDB thoát đột ngột; hoàn tất khi breakpoint biểu thức gây lỗi không còn hủy quá trình gỡ lỗi và hành vi này được bao phủ bởi một bài kiểm thử hồi quy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp, vscode
- Lĩnh vực
- devtools, operating-systems
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100