microsoft / microsoft/vscode-cpptools
expression breakpoint not working as expected
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 14 Std. 46 Min.
- Gemergte PRs (30 T.)
- 61
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den Fehler aus test.c mit der bereitgestellten Startkonfiguration unter Linux mit GDB 9.2 zu reproduzieren, wobei ein Ausdruck, der strcmp enthält, mit 1==1 verglichen wird. Verwende das Debugger-Protokoll, um zu ermitteln, warum GDB unerwartet beendet wird; fertig ist die Aufgabe, wenn der fehlschlagende Ausdrucks-Breakpoint das Debugging nicht mehr abbricht und das Verhalten durch einen Regressionstest abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, vscode
- Bereich
- devtools, operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100