microsoft / microsoft/vscode-cpptools

GDB selected frame is not updated when changing frame

Aperta
#12,892 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug debugger help wanted
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

Environment
  • OS and version: KUbuntu 22.04
  • VS Code: 1.94.2
  • C/C++ extension:v1.22.10
  • GDB / LLDB version: 12.1
Bug Summary and Steps to Reproduce

Bug Summary: When selecting a new frame using the VSCode interface, it does not always update the frame scope from within GDB.

Steps to reproduce:

  1. Configuration
    This simple C++ files is enough to reproduce the error :
// ccp_tools_bug.cpp
#include <iostream>

void bar() {
  std::cout << "bar" << std::endl;
}

int main() {
  bar();
  return 0;
}

Put a breakpoint on the bar function

  1. Starts the debugger, when stopped on the bar function, you can check the current selected frame using this command :
-exec info frame

Image

Then, use the vscode interface to select the top frame and rerun the command :
Image
Image

You can see the selected frame was updated with success.

Now select the bar frame again and recheck the selected frame :
Image
Image

Here you can see the selected frame is no longer updated.


This is a bug I encountered while developing a plugin for GDB. Unfortunately this bug breaks an important feature for VScode users , and requires to starts gdb manually from a terminal

Debugger Configurations
{
  "name": "(gdb) Launch",
  "type": "cppdbg",
  "request": "launch",
  "program": "${workspaceFolder}/build/examples/cpp_tools_bug",
  "args": [],
  "stopAtEntry": false,
  "cwd": "${fileDirname}",
  "environment": [],
  "externalConsole": false,
  "MIMode": "gdb",
  "setupCommands": [
    {
      "description": "Enable pretty-printing for gdb",
      "text": "-enable-pretty-printing",
      "ignoreFailures": true
    },
    {
      "description": "Set Disassembly Flavor to Intel",
      "text": "-gdb-set disassembly-flavor intel",
      "ignoreFailures": true
    }
  ]
},
Debugger Logs

Too much output, the log comes attached

Other Extensions
  • autoDocstring
  • Black Formatter
  • Clang-Format
  • clangd
  • Cmajor-tools
  • CMake
  • Cmake tools
  • cmake-format
  • Docker
  • CS 128 clang tidy
  • graphical debugging

The issue persists after disabling all these extensions

Here is the log of the debug console : cpp_tools_bug.log

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

Riproduci il problema con ccp_tools_bug.cpp ed esamina il file allegato cpp_tools_bug.log confrontando l'output di info frame di GDB dopo aver selezionato i frame top e bar in VS Code. Segui il percorso di selezione dei frame del debugger TypeScript e verifica che cambi di frame ripetuti mantengano sincronizzato il frame selezionato da GDB.

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

Valutazione

Stack tecnologico
typescript
Ambito
devtools
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.