[BUG] Stop caused by cpptools’ own -exec-interrupt (to insert a breakpoint while running) shows ‘Exception has occurred. Signal 0’ and doesn’t resume.
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- devtools
Rechercherichtung
Start by tracing how cppdbg handles GDB MI stop events with reason="signal-received" and how signal-name="0" is surfaced as an exception. The issue provides reproduction steps and debugger logs, but names no source files or tests; first reproduce with a 64-bit GDB debugging a 32-bit WOW64 process while inserting a breakpoint. Done means dynamic breakpoint insertion no longer shows a blocking false error for this stop.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Environment
Environment:
- OS and Version: Windows 10 x64
- VS Code Version: 1.146.0
- C/C++ Extension Version: v1.32.2
- Debugger: GDB (both
x86_64-w64-mingw32-gdb18.1 andgdb-multiarch18.1 from MSYS2) - Target: 32-bit (i386) executable running under WOW64.
Bug Summary and Steps to Reproduce
When debugging a 32-bit (WOW64) process with a 64-bit GDB, the debugger halts and displays an "Exception has occurred. Signal 0" message. This happens when VS Code's cppdbg extension sends an -exec-interrupt command to pause the running process, typically to insert a new breakpoint.
The stop is reported by GDB with reason="signal-received" and signal-name="0" (an unknown signal), which the extension then surfaces as a blocking error dialog. The call stack is irrelevant to the cause; the program counter is simply wherever the thread happened to be (e.g., in a system or library function like SDL_LogCritical). This prevents adding breakpoints during an active debug session, as the user must manually click "Continue" to dismiss the false alarm every time.
To Reproduce:
- On Windows x64, configure
launch.jsonto use a 64-bit GDB (e.g.,C:/msys64/ucrt64/bin/gdb-multiarch.exe) to debug a 32-bit (i386) executable. - Start the debug session and let the program run.
- While the program is running, add a new breakpoint in a source file via the editor gutter.
- VS Code sends
-exec-interruptto pause the process. GDB responds with*stopped,reason="signal-received",signal-name="0". - The extension displays the "Exception has occurred. Signal 0" error.
Expected behavior:
The -exec-interrupt command should result in a normal, silent stop (e.g., reason="signal-received",signal-name="SIGINT"). The extension should not surface this as an exception or error to the user. The debugger should be ready for the subsequent -break-insert command without a blocking dialog.
Actual behavior:
The extension interprets GDB's signal-name="0" as a fatal error and surfaces an "Exception has occurred" dialog, halting the user's workflow.
Debugger Logs (engineLogging: true):
The log clearly shows the sequence: VS Code sends -exec-interrupt in response to a setBreakpoints request, and GDB replies with the spurious signal.
<-- C (setBreakpoints-12): {"command":"setBreakpoints","arguments":{"source":{"name":"Model.cpp",...},"lines":[174],...},"type":"request","seq":12}
1: (6400) <-1027-exec-interrupt
1: (6410) ->~"\nThread 1 stopped.\n"
1: (6415) ->*stopped,reason="signal-received",signal-name="0",signal-meaning="Signal 0",frame={addr="0x6c7be23f",func="SDL_LogCritical",from="...SDL2.dll",arch="i386"},thread-id="1",stopped-threads="all"
Additional context:
- The issue is not related to a specific C++ exception (a
catch throwcatchpoint hastimes="0"). - The issue is not related to SDL's thread-naming exception (
0x406D1388), as settingSDL_WINDOWS_DISABLE_THREAD_NAMING=1does not change the symptom. - The root cause is a known GDB bug where its Windows WOW64 support fails to correctly associate its own internal
DebugBreakProcesscall with the resultingSTATUS_BREAKPOINTexception, misreporting it asSignal 0. - This behavior is reproducible with both
gdbandgdb-multiarchfrom MSYS2. - A workaround is to set all breakpoints before starting the debug session, which avoids the
-exec-interrupt. However, this is not a fix for dynamic breakpoint insertion. - Relevant
launch.jsonconfiguration used:{ "type": "cppdbg", "request": "launch", "MIMode": "gdb", "miDebuggerPath": "C:/msys64/ucrt64/bin/gdb-multiarch.exe", "logging": { "engineLogging": true, "trace": true }, "setupCommands": [ ... ] } - An
ignoreFailuresor a "continue on signal 0" option in the extension could serve as a potential workaround for users unable to change their GDB version.
Debugger Configurations
see above
Debugger Logs
see above
Other Extensions
No response
Additional Information
No response
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.2k
- Forks
- 1.7k
- Ø Merge
- 1 T. 17 Std.
- Gemergte PRs (30 T.)
- 12
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-cpptools
-
Missing gcc __builtin_stdc_bit_width/floor/ceil signature makes intellisense wrongly report error 70Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
microsoft/vscode-cpptools#14874 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
microsoft/vscode-cpptools#14872 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 56/100
microsoft/vscode-cpptools#14871 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Goto definition (F12) not working with (recursive) includesEvtl. vergeben @Colengms hat das vor 5 Tagen übernommen. Offenbug fixed Language Service
microsoft/vscode-cpptools#14868 · 2 Kommentare · 1 Reaktion · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Support for new "!" file exclusion syntaxEvtl. vergeben @Colengms hat das vor 5 Tagen übernommen. Offenbug Language Service
microsoft/vscode-cpptools#14867 · 4 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microsoft/vscode-cpptools
Ähnliche Issues
-
area:cli area:security bug priority:medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
rtk-ai/rtk#5127 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
"code source" and "numerique.gouv" links: "new window" mention duplicated in the accessible nameOffenaccessibility
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
numerique-gouv/lasuite-landingpage#315 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs:triage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
HyeokjaeChoi/vaultme#585 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement priority/P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
beettlle/pi-smart-router#200 ·