feat(nvim/dap): gdb debuuger

This commit is contained in:
Marvin Drescher 2024-04-02 09:14:47 +02:00
parent 27c690efc5
commit 65aa4f26ee
2 changed files with 40 additions and 1 deletions

View File

@ -59,3 +59,42 @@ dap.configurations.c = {
request = 'attach', request = 'attach',
processId = require('dap.utils').pick_process, processId = require('dap.utils').pick_process,
}, },
{
name = "Debug J-Link",
type = "cdbg",
request = "launch",
cwd = "${workspaceFolder}",
program = function()
local path = vim.fn.input({
prompt = 'Path to executable: ',
default = vim.fn.getcwd() .. '/',
completion = 'file',
})
return (path and path ~= '') and path or dap.ABORT
end,
stopAtEntry = false,
MIMode = "gdb",
miDebuggerServerAddress = function()
local address = vim.fn.input({
prompt = 'Server address: ',
default = 'localhost:3333',
})
return address
end,
miDebuggerPath = "gdb-multiarch",
serverLaunchTimeout = 5000,
postRemoteConnectCommands = {
{
text = "monitor reset",
ignoreFailures = false
},
{
text = "load",
ignoreFailures = false
},
},
}
}

View File

@ -10,7 +10,7 @@ vim.g.rustaceanvim = {
test_executor = require('rustaceanvim.executors').neotest; test_executor = require('rustaceanvim.executors').neotest;
crate_test_executor = require('rustaceanvim.executors').background; crate_test_executor = require('rustaceanvim.executors').neotest;
-- callback to execute once rust-analyzer is done initializing the workspace -- callback to execute once rust-analyzer is done initializing the workspace
-- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error" -- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error"