Documentation: add Frequently Asked Questions. (#1567)

This commit is contained in:
Alessandro Arzilli 2019-06-03 19:20:26 +02:00 committed by Derek Parker
parent b9f7dd5008
commit 21ac0eb4f8
2 changed files with 42 additions and 0 deletions

41
Documentation/faq.md Normal file

@ -0,0 +1,41 @@
## Frequently Asked Questions
#### I'm getting an error while compiling Delve / unsupported architectures and OSs
The most likely cause of this is that you are running an unsupported Operating System or architecture.
Currently Delve supports Linux, Windows and macOS on the amd64 architecture (also known as Intel 86x64).
For example if you are getting the `undefined: ArchInst` error message while compiling Delve, that means that Delve doesn't currently support your processor architecture.
There is no planned ETA for support of other architectures or operating systems. Bugs tracking requested support are:
- [i386 support](https://github.com/go-delve/delve/issues/20)
- [ARM support](https://github.com/go-delve/delve/issues/118)
- [PowerPC support](https://github.com/go-delve/delve/issues/1564)
- [FreeBSD support](https://github.com/go-delve/delve/issues/213)
#### How do I use Delve with Docker?
When running the container you should pass the `--security-opt=seccomp:unconfined` option to Docker. You can start a headless instance of Delve inside the container like this:
```
dlv exec --headless --listen :4040 /path/to/executable
```
And then connect to it from outside the container:
```
dlv connect :4040
```
The program will not start executing until you connect to Delve and send the `continue` command. If you want the program to start immediately you can do that by:
1. Passing the `--accept-multiclient` option to the headless instance of delve: `dlv exec --headless --listen :4040 --accept-multiclient /path/to/executable`
2. Using the following script:
```
#!/bin/bash
while true; do sleep 1; dlv connect :4040 --init <(echo quit -c) && exit; done
```
Note that the connection to Delve is unauthenticated and will allow arbitrary remote code execution: *do not do this in production*.

@ -19,6 +19,7 @@ The GitHub issue tracker is for **bugs** only. Please use the [developer mailing
- [Command line options](Documentation/usage/dlv.md) - [Command line options](Documentation/usage/dlv.md)
- [Command line client](Documentation/cli/README.md) - [Command line client](Documentation/cli/README.md)
- [Plugins and GUIs](Documentation/EditorIntegration.md) - [Plugins and GUIs](Documentation/EditorIntegration.md)
- [Frequently Asked Questions](Documentation/faq.md)
- [Contributing](CONTRIBUTING.md) - [Contributing](CONTRIBUTING.md)
- [Internal Documentation](Documentation/internal) - [Internal Documentation](Documentation/internal)
- [API documentation](Documentation/api) - [API documentation](Documentation/api)