microsoft / microsoft/vscode-cpptools
Breakpoints not cleared when stopping debug using J-Link GDB Server
Nessuno ha ancora preso questa issue.
- 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: Windows 10 1809
- VS Code Version: 1.31.1
- C/C++ Extension Version: 0.21.0
- Other extensions you installed (and if the issue persists after disabling them): None
Using gdb to debug a remote target using the J-Link GDB Server and stopping the debug session while the target is running causes an unclean shut down of the debug session. If a new debug session is then launched to the same J-Link GDB Server you are greeted with a message from the GDB server:
Debugger problem discovered:
The debugger has set two breakpoints at the same address 0xXXXXXXXX.
To Reproduce
J-Link GDB Server requires a remote target to debug so unless you happen to have that reproducing it will prove difficult.
Steps to reproduce the behavior:
- Start the J-Link GDB Server against a target
- Start a debug session in VS Code
- When it hits main() continue execution
- Stop the debugging session
- Start a new debug session in VS Code
- Observe the above message dialog from J-Link GDB Server
Additional context
The problem is in how the session is ended. Using engineLogging the following is observed:
1: (5663) <--exec-continue
1: (5666) ->^running
1: (5666) ->*running,thread-id="all"
1: (5666) ->(gdb)
1: (5666) ->&"\n"
1: (5666) ->^done
1: (5669) ->(gdb)
1: (8088) <--gdb-exit
1: (8093) ->^exit
1: (8093) ->&"Cannot execute this command while the target is running.\n"
1: (8093) ->&"Use the \"interrupt\" command to stop the target\n"
1: (8093) ->&"and then try again.\n"
1: (8093) ->=thread-group-exited,id="i1"
1: (8099) <-logout
1: (8099) "C:/arm/sysroot/bin/arm-none-eabi-gdb.exe" exited with code 0 (0x0).
The J-Link GDB Server does not allow you simply exit while the target is running hence no cleanup is performed. If you were to halt the target before stopping the session there are no issues at all.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo la sequenza di arresto con un J-Link GDB Server e una destinazione remota, quindi esamina l’output di engineLogging che mostra gdb-exit mentre la destinazione è in esecuzione. Il lavoro è completato quando l’arresto di una sessione in esecuzione esegue la pulizia necessaria, in modo che una sessione successiva non segnali breakpoint duplicati; verifica il comportamento ripetendo i passaggi elencati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript, vscode
- 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