microsoft / microsoft/vscode-cpptools

Breakpoints are disabled on gdb attach and unable to pause on a running application

Aperta
#10,528 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

Environment:
Running vscode on Mac
Linux in virtual machine

Launch.json
{
"type": "cppdbg",
"request": "attach",
"name": "engine - Attach",
"program": "${workspaceFolder}/install/bin/engine",
"processId": "${command:pickProcess}",
"logging": { "engineLogging": true, "traceResponse": true },
"sourceFileMap": { "${workspaceRoot}" : "${workspaceRoot}" },
},

Issue 1 : Breakpoints are disabled on gdb attach, Failure to add break points

When adding breakpoint after attach these messages are logged

Thread 
--> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"1 \"engine\" received signal SIGTRAP, Trace/breakpoint trap.\n"},"seq":839}
1 "engine" received signal SIGTRAP, Trace/breakpoint trap.
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231607) ->~\"0x00007f9bb1237c61 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x564c1ddf2010 <queue_get_sleep_time>, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48\\n\"\n"},"seq":841}
1: (231607) ->~"0x00007f9bb1237c61 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x564c1ddf2010 <queue_get_sleep_time>, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231607) ->~\"48\\tin ../sysdeps/unix/sysv/linux/clock_nanosleep.c\\n\"\n"},"seq":843}
1: (231607) ->~"48\tin ../sysdeps/unix/sysv/linux/clock_nanosleep.c\n"
--> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"0x00007f9bb1237c61 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x564c1ddf2010 <queue_get_sleep_time>, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48\n"},"seq":845}
0x00007f9bb1237c61 in __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0x564c1ddf2010 <queue_get_sleep_time>, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:48
--> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"48\tin ../sysdeps/unix/sysv/linux/clock_nanosleep.c\n"},"seq":847}
48	in ../sysdeps/unix/sysv/linux/clock_nanosleep.c
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231607) ->*stopped,reason=\"signal-received\",signal-name=\"SIGTRAP\",signal-meaning=\"Trace/breakpoint trap\",frame={addr=\"0x00007f9bb1237c61\",func=\"__GI___clock_nanosleep\",args=[{name=\"clock_id\",value=\"0\"},{name=\"clock_id@entry\",value=\"0\"},{name=\"flags\",value=\"0\"},{name=\"flags@entry\",value=\"0\"},{name=\"req\",value=\"0x564c1ddf2010 <queue_get_sleep_time>\"},{name=\"rem\",value=\"0x0\"}],file=\"../sysdeps/unix/sysv/linux/clock_nanosleep.c\",fullname=\"./time/../sysdeps/unix/sysv/linux/clock_nanosleep.c\",line=\"48\",arch=\"i386:x86-64\"},thread-id=\"1\",stopped-threads=\"all\",core=\"1\"\n"},"seq":849}
1: (231607) ->*stopped,reason="signal-received",signal-name="SIGTRAP",signal-meaning="Trace/breakpoint trap",frame={addr="0x00007f9bb1237c61",func="__GI___clock_nanosleep",args=[{name="clock_id",value="0"},{name="clock_id@entry",value="0"},{name="flags",value="0"},{name="flags@entry",value="0"},{name="req",value="0x564c1ddf2010 <queue_get_sleep_time>"},{name="rem",value="0x0"}],file="../sysdeps/unix/sysv/linux/clock_nanosleep.c",fullname="./time/../sysdeps/unix/sysv/linux/clock_nanosleep.c",line="48",arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="1"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231607) <-1039-break-insert -f /home/usr1/src/app/validates.cc:1960\n"},"seq":851}
1: (231607) <-1039-break-insert -f /home/usr1/src/app/validates.cc:1960
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231626) ->&\"No source file named /home/usr1/src/app/validates.cc.\\n\"\n"},"seq":853}
1: (231626) ->&"No source file named /home/usr1/src/app/validates.cc.\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231626) ->1039^done,bkpt={number=\"13\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"/home/usr1/src/app/validates.cc:1960\",times=\"0\",original-location=\"/home/usr1/src/app/validates.cc:1960\"}\n"},"seq":855}
1: (231626) ->1039^done,bkpt={number="13",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="/home/usr1/src/app/validates.cc:1960",times="0",original-location="/home/usr1/src/app/validates.cc:1960"}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231626) ->(gdb)\n"},"seq":857}
1: (231626) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231626) 1039: elapsed time 18\n"},"seq":859}
1: (231626) 1039: elapsed time 18
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231627) Send Event AD7BreakpointErrorEvent\n"},"seq":861}
1: (231627) Send Event AD7BreakpointErrorEvent
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231627) <--exec-continue\n"},"seq":863}
1: (231627) <--exec-continue
--> R (setBreakpoints-15): {"type":"response","request_seq":15,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":13,"verified":true,"line":1960,"BoundBreakpoints":[]},{"id":2,"verified":false,"message":"Module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained.","line":1980,"BoundBreakpoints":[]}]},"seq":865}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231627) ->^running\n"},"seq":867}
1: (231627) ->^running
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231627) ->*running,thread-id=\"all\"\n"},"seq":870}
1: (231627) ->*running,thread-id="all"
--> E (breakpoint): {"type":"event","event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":13,"verified":false,"message":"Module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained.","line":1960,"BoundBreakpoints":[]}},"seq":869}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (231628) ->(gdb)\n"},"seq":873}
1: (231628) ->(gdb)

Issue 2 : unable to pause on a running application

On trying to pause I see this message
Could not load source './time/../sysdeps/unix/sysv/linux/clock_nanosleep.c': 'SourceRequest' not supported..

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 lo scenario di attach di gdb dalla configurazione launch.json e analizza il comportamento registrato di setBreakpoints, SIGTRAP e pause. Traccia la gestione dei breakpoint in attesa e dell’errore SourceRequest; il lavoro è completato quando è possibile aggiungere breakpoint dopo l’attach e mettere in pausa un’applicazione in esecuzione senza che si verifichi l’errore di caricamento del codice sorgente segnalato.

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.