# Allow for using config specific \`gdb\` binaries in gdb adapter \(\#37193\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/b78f19982f00373d2794db1b7330ea6c221a84cd)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: b78f19982f00373d2794db1b7330ea6c221a84cd

Requested commit: b78f19982f00373d2794db1b7330ea6c221a84cd

Commit: b78f19982f00373d2794db1b7330ea6c221a84cd

Tree: c636f2083116718e143c7e2ce60df955975946f9

Author: Bo Lorentsen

Committer: GitHub

## Message

```
Allow for using config specific `gdb` binaries in gdb adapter (#37193)

I really need this for embedded development in IDF and Zephyr, where the
chip vendors sometimes provide there own specialized version of the
tools, and I need to direct zed to use these.

The current GDB adapter only supports the gdb it find in the normal
search path, and it also seems like we where not able to transfer gdb
specific startup arguments (only `-i=dap` is set) .

In order to fix this I (semi wipe using GPT-4.1) expanded the GDB
adapter with 2 new config options :

* **gdb_path** holds a full path to the gdb executable, for now only
full path or relative to cwd
* **gdb_args** an array holding additional arguments given to gdb on
startup
 
It seemed to me, like the `env` config did not transferred to gdb, so
this is added to.
 
 I have tested this locally, and it seems to work not only compile :-)

Release Notes:

debugger: Adds gdb_path and gdb_args to gdb debug adapter options 
debugger: Fix bug where gdb debug sessions wouldn't inherit the shell
environment from Zed

---------

Co-authored-by: Anthony <anthony@zed.dev>
```

## Parents

- [a7fac65d62c1cd51b5c7d8d56dd5dc2505898bbd](https://git.cafe/gitcafe/zed/commit/a7fac65d62c1cd51b5c7d8d56dd5dc2505898bbd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/b78f19982f00373d2794db1b7330ea6c221a84cd?format=markdown)
