microsoft / microsoft/vscode-cpptools

Unable to pause execution with root gdb

Aperta
#4,243 46 commenti 1 reazione 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

Type: Debugger

Describe the bug

  • OS and Version: Ubuntu 16.04.6 LTS
  • VS Code Version: 1.38.1
  • C/C++ Extension Version: 0.25.1

We needed to debug a program which needs root privileges to be run. In order to do this a added a wrapper to gdb to lauch with sudo and without password.

#!/bin/bash
sudo gdb "$@"

When we launch a program with the wrapped dbg(set on miDebuggerPath), we are not able to pause the execution of the program or add and stop on a breakpoint.

Although, when the breakpoint is already set before lauching the debugger, it will pause there and we are able to step through the code and also set new breakpoints. After removing the breakpoints and continuing execution we are again unable to pause execution.

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 problema con il wrapper sudo gdb configurato tramite miDebuggerPath su Ubuntu. Confronta il comportamento della pausa e dei breakpoint prima e dopo la ripresa dell'esecuzione; il lavoro è concluso quando è possibile mettere in pausa l'esecuzione e aggiungere breakpoint in modo affidabile durante il debug di un programma che richiede i privilegi di root.

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

Valutazione

Stack tecnologico
bash, typescript, ubuntu, 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.