- Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Hi everyone,
First off, thank you all for your hard work!
System:
- OS: macOS Sierra 10.12
- VS Code: 1.11.2
- vscode-cpptools: 0.11.0
- gdb: GNU gdb 6.6
The Problem
- Breakpoints do not work
- Attempting to set breakpoints in VS Code returns "Attempting to bind the breakpoints...."
"stopAtEntry": truedoes not stop execution
- Pause button does not do anything while "debugging"
Some Background Info
I'm currently trying to debug an OS/161 kernel using gdb, through VS Code. Unlike most programs, OS/161 is set up like so:
# Set up the sys161 simulator using the kernel, # and wait until gdb has connected to unix:.sockets/gdb $> sys161 -w kernel # Connect to unix:.sockets/gdb $> gdb kernel (gdb) target remote unix:.sockets/gdbI've managed to connect to the UNIX socket following the examples posted here, but I cannot get gdb to properly integrate. My launch.json looks like this:
{ "version": "0.2.0", "configurations": [ { "name": "Debug", "type": "cppdbg", "request": "launch", "preLaunchTask": "Compile", "program": "~/os161/root/kernel", "cwd": "~/os161/root", "miDebuggerServerAddress": "unix:.sockets/gdb", "miDebuggerPath": "/usr/local/bin/gdb", "launchCompleteCommand": "exec-continue", "stopAtEntry": true, "logging": { "trace": true, "traceResponse": true } } ] }Logs
At start:
R: {"success":true,"message":null,"request_seq":5,"command":"threads","body":{"threads":[]},"running":false,"refs":null,"seq":0,"type":"response"}Placing a breakpoint:
C setBreakpoints: {"source":{"path":"/Users/user/os161/os161-1.99/root/kern/startup/menu.c"},"lines":[77],"breakpoints":[{"line":77}],"sourceModified":false} R: {"success":true,"message":null,"request_seq":6,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"verified":true,"line":77,"message":null}]},"running":false,"refs":null,"seq":0,"type":"response"} E breakpoint: {"reason":"changed","breakpoint":{"id":1,"verified":false,"line":77,"message":"Attempting to bind the breakpoint...."},"type":"breakpoint"}Any help would be appreciated, thank you!
Edit:
Appears that gdb 6.6 does not support GDB/MI so it doesn't look like this'll work with VS Code.
Appears that gdb 6.6 DOES support GDB/MI, the issue is that gdb 6.6 does not support -thread-info and/or -gdb-set target async [on/off].