- 05 5月, 2021 4 次提交
-
-
由 Alessandro Arzilli 提交于
Add documentation on how to pass arguments to the program generated by `dlv test`. Fixes #2458
-
由 Alessandro Arzilli 提交于
Check for errors, log them and return early, do not try to allocate large chunks of memory that we can never possibly read from the file. Fixes #2449
-
由 polinasok 提交于
* go.mod: update google/go-dap to 0.5.0 * Go mod tidy Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
由 Christian Banse 提交于
* proc: Slightly better version check for gdb server on newer macOS * Adjusted version to be >= 1200 and <= 1205
-
- 04 5月, 2021 1 次提交
-
-
由 Hyang-Ah Hana Kim 提交于
The documentation mentions flags that do not exist. Replace them with the existing, --log-dest flag.
-
- 29 4月, 2021 2 次提交
-
-
由 polinasok 提交于
-
由 Alessandro Arzilli 提交于
Moves the implementation of Registers.Get out of the backends and into proc where it can be implemented only once per architecture.
-
- 27 4月, 2021 2 次提交
-
-
由 Felix Geisendörfer 提交于
* examinememory: evaluate addr as expression This makes it easy to read memory locations at an offset of a known address, e.g.: x 0xc000046800 + 32 * use feedback from @aarzilli - expression mode is now enabled via -x flag - support "-x var", "-x &var" in addition to "-x <addr expr>" - some refactoring * add test cases * deal with double spaces * update docs * add new failing test * fix docs * simplify implementation, update test & docs * Fix docs
-
由 Suzy Mueller 提交于
* service/dap: add go build stderr to error response * service/dap: add go build stderr to error response * Skip message check for build errors * test for flag provided message
-
- 23 4月, 2021 1 次提交
-
-
由 Suzy Mueller 提交于
-
- 22 4月, 2021 3 次提交
-
-
由 Alessandro Arzilli 提交于
Due to variable shadowing the SwitchGoroutine command never failed.
-
由 Alessandro Arzilli 提交于
There seems to be a problem where debugserver will leave a zombie process instead of detaching correctly, we are sending the right commands, it doesn't seem to be a problem with Delve.
-
由 polinasok 提交于
* service/dap: refine teardown logic * Address review comments + add missing lock/unlock * Narrow lock scope * Update comments only * Remove redundan temp var from stopNoDebugProcess * Clarify comment * Set debugger to nil after detach to prevent dup teardown in Stop() Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
- 20 4月, 2021 3 次提交
-
-
由 Suzy Mueller 提交于
Rename the launch configuration for specifying the working directory.
-
由 Suzy Mueller 提交于
* service/dap: annotate shadowed variable names in variables request In order to distinguish variables that are shadowed, this change updates the names from 'name' to '(name)'. This is the same syntax used in the terminal package. * remove unnecessary comment * Add todo for evaluate name * Check the evaluateName result is the unshadowed var
-
由 Alessandro Arzilli 提交于
* service/rpcommon: resolve race between Detach and shutdown Detach will close DisconnectChan causing the server to initiate shutdown, there is a race between Detach writing its response to the client and the shutdown terminating the server process. If Detach loses the race the response to the Detach request is never sent to the client and the client will report an EOF error instead. This change delays the start of the shutdown process until after Detach has written its response. Fixes an occasional failure of TestContinue. * service/rpccommon: ignore listener error when shutting down Ignore the closed listener error when the server is being shut down in response to a SIGINT signal. Fixes #1633
-
- 17 4月, 2021 1 次提交
-
-
由 Koichi Shiraishi 提交于
-
- 16 4月, 2021 1 次提交
-
-
由 Suzy Mueller 提交于
* service/dap: add substitutePath configuration Similar to substitute-path configuration in the dlv cli, substitutePath in dap allows users to specify path mappings that are applied to the source files in stacktrace and breakpoint requests. Updates #2203 * service/dap: refactor the startup of the fixture for attach Add a helper function for starting up a process to attach to. * service/dap: update substitute path tests for windows * service/dap: remove lines that should have been removed in merge * respond to comments on pr * move logging to helper functions * make test comments more clear * Add comments about absolute paths * fix log messages * clarify test comments * remove comment about absolute paths
-
- 14 4月, 2021 1 次提交
-
-
由 polinasok 提交于
Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
- 13 4月, 2021 7 次提交
-
-
由 Alessandro Arzilli 提交于
We have some places where we use proc.ErrProcessExited and some places that use &proc.ErrProcessExited, resulting in checks for process exited errors occasionally failing on some architectures. Uniform use of ErrProcessExited to the non-pointer version. Fixes intermittent failure of TestStepOutPreservesGoroutine.
-
由 polinasok 提交于
Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
由 Alessandro Arzilli 提交于
When restarting we must take care of setting breakpoint IDs correctly so that enabled breakpoints do not end up having the same ID as a disabled breakpoint, also we must make sure that breakpoints created after restart will not get an ID already used by a disabled breakpoint.
-
由 Alessandro Arzilli 提交于
-
由 Alessandro Arzilli 提交于
Delete tests for old versions of Go that are no longer run, remove skip from tests that seemingly work.
-
由 Ernie Hershey 提交于
-
由 polinasok 提交于
Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
- 09 4月, 2021 1 次提交
-
-
由 Hyang-Ah Hana Kim 提交于
It's expected that users enter invalid expressions through DEBUG CONSOLE. Pop up for every error is not pleasant.
-
- 08 4月, 2021 1 次提交
-
-
由 polinasok 提交于
-
- 07 4月, 2021 1 次提交
-
-
由 polinasok 提交于
Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
- 06 4月, 2021 3 次提交
-
-
由 Alessandro Arzilli 提交于
- allow a concrete subprogram to be treated as the abstract origin for an inlined call - allow nameless concrete and abstract subprograms Fixes #2393
-
由 Hyang-Ah Hana Kim 提交于
* dap: change how noDebug launch request is served PR #2400 added support for noDebug launch requests - that was done by directly starting the target program using os/exec.Cmd and blocking the launch request indefinitely until the program terminates or is stopped with a disconnect request (when dlv dap can support it). Even though the approach seemed to work for user, that adds an extra control flow and complexity to the codebase. This change takes a different approach to implement the noDebug launch feature. Instead of using os/exec.Cmd, this uses the existing debug launch path, but avoids setting breakpoints. Finally, the program will start upon receiving onConfigurationDoneRequest and blocks there until the program terminates. This simplifies the code. The DAP spec does not explicitly specify what to do about other requests. It seems like VSCode can issue evaluate requests or other requests after the configuration done request. Currently they are blocked because the program is in running state. We can consider checking s.noDebug and responding with an error in the future if we want/need to. See the log below for a typical DAP request/response sequence: 2021-03-29T01:42:53-04:00 debug layer=dap building binary at /Users/hakim/projects/s/__debug_bin 2021-03-29T01:42:55-04:00 info layer=debugger launching process with args: [/Users/hakim/projects/s/__debug_bin] 2021-03-29T01:42:55-04:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"initialized"} 2021-03-29T01:42:55-04:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":2,"success":true,"command":"launch"} 2021-03-29T01:42:55-04:00 debug layer=dap [<- from client]{"seq":3,"type":"request","command":"setBreakpoints","arguments":{"source":{"name":"main.go","path":"/Users/hakim/projects/s/main.go"},"breakpoints":[{"line":9}],"lines":[9]}} 2021-03-29T01:42:55-04:00 error layer=dap Unable to set or clear breakpoints: running in noDebug mode 2021-03-29T01:42:55-04:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":3,"success":false,"command":"setBreakpoints","message":"Unable to set or clear breakpoints","body":{"error":{"id":2002,"format":"Unable to set or clear breakpoints: running in noDebug mode"}}} 2021-03-29T01:42:55-04:00 debug layer=dap [<- from client]{"seq":4,"type":"request","command":"configurationDone","arguments":{}} 2021-03-29T01:42:55-04:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":4,"success":true,"command":"configurationDone"} 2021-03-29T01:42:55-04:00 debug layer=debugger continuing Hello 2021-03-29T01:43:00-04:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"terminated","body":{}} 2021-03-29T01:43:00-04:00 debug layer=dap [<- from client]{"seq":5,"type":"request","command":"threads"} 2021-03-29T01:43:00-04:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":5,"success":true,"command":"threads","body":{"threads":null}} 2021-03-29T01:43:00-04:00 debug layer=dap [<- from client]{"seq":6,"type":"request","command":"disconnect","arguments":{}} 2021-03-29T01:43:00-04:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":6,"success":true,"command":"disconnect"} 2021-03-29T01:43:00-04:00 debug layer=debugger halting 2021-03-29T01:43:00-04:00 error layer=dap Process 27219 has exited with status 0 2021-03-29T01:43:00-04:00 debug layer=debugger detaching Updates https://github.com/golang/vscode-go/issues/1111 * service/dap: address polina's comments for noDebug logic Reworked so the noDebug launch request again blocks launch request handler after responding with the launch response. By skipping the initialized event, it should prevent well-behaving clients from sending any further requests. Currently, doesn't matter because the handler goroutine will be blocked until the program termination anyway. Placed mutex back, since I noticed that's the only way to prevent racing between Stop and the handler goroutine. The synchronization lotic (in particular, during teardown) should be revisited after asynchronous request support work is done. * dap: address more comments
-
由 Alessandro Arzilli 提交于
Remove unnecessary conditionally compiled files introduced with the darwin/arm64 port.
-
- 03 4月, 2021 3 次提交
-
-
由 Alessandro Arzilli 提交于
Some users seem to need to do this in order to use a debugger.
-
由 Suzy Mueller 提交于
* service/dap: switch goroutine before stepping The correct goroutine needs to be selected when stepping in order for the step to execute to the correct location. * handle next in progress while stepping * Add tests for steps when switching goroutine * remove nextInProgress handling * add new step out test and review debug state check * update text of stopped event and set goroutine id
-
由 Hyang-Ah Hana Kim 提交于
Error level logging shows up in the users' consoles/terminals so be more conservative when logging. Move the followings to Debug logging. - DAP error reponses caused by invalid requests. They are application level errors and DAP clients should handle them. - Errors reported when debugee already exited. Fixes golang/vscode-go#1392
-
- 26 3月, 2021 2 次提交
-
-
由 Alessandro Arzilli 提交于
Changes print so a format argument can be specified by using '%' as prefix. For example: print %x d will print variable 'd' in hexadecimal. The interpretarion of the format argument is the same as that of fmt's package. Fixes #1038 Fixes #1800 Fixes #2159
-
由 polinasok 提交于
* Truncate long compound map keys and use address suffix only for those * Remove test typo that causes failures Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
- 25 3月, 2021 1 次提交
-
-
由 polinasok 提交于
* Add logging and comments to clarify relative output path treatement * Use absolute output path in one of the unittests Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
- 24 3月, 2021 1 次提交
-
-
由 Hyang-Ah Hana Kim 提交于
If the launch requests has noDebug attribute set, run the built binary directly. The launch request handler will block until the binary terminates, so the editor won't send additional requests like breakpoint setting etc. Still disconnect or restart requests can flow in though and they should trigger killing of the target process if it's still running. In order to run the binary using os/exec on windows, the target binary has to have .exe as its extension. So, add .exe to the default output name if it is on windows. I am not sure though yet we want to modify the user-specified output or not yet. Considering how go commands behave (not automatically append .exe for 'go build -o') I think respecting what user specified is right, but the failure (file not exist) may be mysterious.
-
- 23 3月, 2021 1 次提交
-
-
由 Suzy Mueller 提交于
* service/dap: use specified working directory for launch requests If a user specifies a working directory in the launch request, then the process should use that working directory. This may affect how the program runs and the user should be able to have control over this. * service/dap: add tests for launch with working dir Added tests to make sure the working directory is set correctly. * service/dap: fix TestWorkingDir on windows * service/dap: use %q to print quoted string * cmd/dlv: update dap warning about working dir * service/dap: change the launch argument to be wd` * update warning to specify only launch request
-