microsoft / microsoft/vscode-cpptools

When debugging multiple inferiors with gdb, if one inferior exits the full debug session stops

Offen
#13,893 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug debugger help wanted
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

Environment
  • OS and version: Arch Linux with gdb 16.3
  • VS Code: 1.103.1
  • C/C++ extension: 1.26.3
  • OS and version of remote machine (if applicable): n/a
  • GDB / LLDB version: 16.3
Bug Summary and Steps to Reproduce

Bug Summary:

When debugging multiple inferiors in gdb, if one inferior exits the vscode debug session ends.

Steps to reproduce:

  1. git clone this repo: https://github.com/lostgoat/multiinferior-repro
  2. Set a breakpoint on the "parent exiting" line
  3. Start the "(gdb) Launch" debug task

When running gdb with the same configuration via commandline everything works correctly. Execution pauses after the child exits, and then one can use inferior <id> to switch back to the parent and keep debugging.

Debugger Configurations
{
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "preLaunchTask": "build test app",
            "request": "launch",
            "program": "${workspaceFolder}/test.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Keep both sides of fork",
                    "text": "set detach-on-fork off"
                },
                {
                    "description": "Allow multiple inferiors to run",
                    "text": "set schedule-multiple on"
                }
            ],
            "logging": { "engineLogging": true, "trace": true, "traceResponse": true }
        },
Debugger Logs
Output window:

Starting test
parent running 
waiting for child: 965664
parent waitpid returned: 0 - 0
child started
child looping: 0
child looping: 1
child looping: 2
child looping: 3
parent waitpid returned: 0 - 0
child looping: 4
child looping: 5
child looping: 6
child looping: 7
parent waitpid returned: 0 - 0
child looping: 8
child looping: 9
child exiting
Other Extensions

No response

Additional Information

No response

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Klonen Sie das verknüpfte multiinferior-repro-Repository und reproduzieren Sie den Fehler mit der (gdb) Launch-Konfiguration sowie detach-on-fork off und schedule-multiple on. Beginnen Sie damit, die GDB/MI-Sitzungsverwaltung der Erweiterung zu verfolgen, wenn ein inferior beendet wird. Als erledigt gilt die Aufgabe, wenn die Sitzung aktiv bleibt, wie erwartet pausiert und weiterhin das Wechseln zum überlebenden inferior ermöglicht.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, typescript, vscode
Bereich
devtools
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.