microsoft / microsoft/vscode-cpptools

[FEATURE REQUEST] Support debugging for YACC

Offen
#4,942 5 Kommentare 5 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

debugger Feature Request more votes needed
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

Type: Debugger

Can't DEBUG YACC files.

I wrote a short yacc file which had a problem.
I wasn't able to attach a debugger to the main function.

I would like to see the following:

  • Being able to set and hit breakpoints in the original .y file

  • Being able to hit breakpoints in the y.tab.c file (generated by yacc).

  • have automatic task support for makefiles (should this be a new issue)?

  • OS and Version: Ubuntu 19.10

  • VS Code Version: ms-vscode.cpptools

  • C/C++ Extension Version: 0.26.3

To Reproduce
I made a short version of a yacc file to highlight the problems.
This yacc file is not supposed to work, it's supposed to highlight the problems with the debugger.
All the files are in this gist: https://gist.github.com/rvanlaar/000c06347ef6fd6bfb5e7ddb8e17f0aa

The y.tab.c is generated with debug options enabled:
yacc -t --debug --verbose hoc1.y

Steps to reproduce the behavior:

  1. Open the files in VSCode
  2. Set a breakpoint on line y.tab.c: 1458
  3. compile with: cc -g y.tab.c -o hoc1
  4. run the debugger
  5. See it doesn't hit the breakpoint while executing

Additional context
https://gist.github.com/rvanlaar/000c06347ef6fd6bfb5e7ddb8e17f0aa#file-full-debug-log
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your launch.json
Add any other context about the problem here including log or error messages in your Debug Console or Output windows.

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

Beginne mit den bereitgestellten Dateien hoc1.y und y.tab.c und reproduziere den Fehler bei Breakpoints mit yacc -t --debug --verbose hoc1.y und cc -g y.tab.c -o hoc1; sieh dir anschließend das verlinkte Debugger-Log an. Als erledigt gilt die Aufgabe, wenn Breakpoints sowohl in der ursprünglichen .y-Datei als auch in der generierten y.tab.c-Datei gesetzt und erreicht werden können.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
c
Bereich
devtools
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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