microsoft / microsoft/vscode-cpptools

expression breakpoint not working as expected

Aperta
#9,503 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

debugger more info needed
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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
image

Steps to reproduce:

  1. Only on Linux environment(both local and remote to it via remote-ssh), it works well on local windows environment
  2. 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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il malfunzionamento di test.c con la configurazione di avvio fornita su Linux usando GDB 9.2, confrontando un’espressione contenente strcmp con 1==1. Usa il log del debugger per determinare perché GDB termina inaspettatamente; il lavoro è completato quando il breakpoint sull’espressione che causa il malfunzionamento non interrompe più il debugging e il comportamento è coperto da un test di regressione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp, vscode
Ambito
devtools, operating-systems
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.