- 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
-
- 20 3月, 2021 1 次提交
-
-
由 Álex Sáez 提交于
* Adds toggle command Also adds two rpc2 tests for testing the new functionality * Removes Debuggers' ToggleBreakpoint method rpc2's ToggleBreakpoint now calls AmendBreakpoint Refactors the ClearBreakpoint to avoid a lock.
-
- 16 3月, 2021 4 次提交
-
-
由 polinasok 提交于
* Use (*api.Variable).SinglelinesString() for dap.Variable values * Make DeepSource happy * Adjust unreadable regex in tests * Use regex for runtime.mutex variable test Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
由 Andrei Matei 提交于
The godwarf package provides two ways to turn a dwarf.Entry into a godwarf.Tree: LoadTree and EntryToTree. The former doesn't handle children - it doesn't advance a Reader past them (in fact, it doesn't even know about a Reader). EntryToTree is only used for variables and formal param DIEs, which don't have children, and it would very likely be incorrect to use it for DIEs with children. This patch makes the function panic if the entry can have children.
-
由 polinasok 提交于
Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
由 Alessandro Arzilli 提交于
-
- 15 3月, 2021 1 次提交
-
-
由 Andrei Matei 提交于
The wiki was removed a long time ago.
-
- 13 3月, 2021 1 次提交
-
-
由 Bryan Heden 提交于
* fix spelling error * Revert "fix spelling error" This reverts commit 08058c9efbcee5d86ef429be5bd66f8307fb02d8. * update doc source and doc/fix spelling error
-
- 12 3月, 2021 1 次提交
-
-
由 Ilia Choly 提交于
This change allows specifying an optional linespec after the 'continue' command which sets a temporary breakpoint. Fixes #2373
-
- 10 3月, 2021 1 次提交
-
-
由 Ilia Choly 提交于
-
- 09 3月, 2021 6 次提交
-
-
由 Alessandro Arzilli 提交于
This adds a workaround for the bug described at: https://github.com/golang/go/issues/25841 Because dsymutil running on PIE does not adjust the address of debug_frame entries (but adjusts debug_info entries) we try to do the adjustment ourselves. Updates #2346
-
由 Alessandro Arzilli 提交于
1usec is very much not enough
-
由 Alessandro Arzilli 提交于
* service: serialize calls to Command API Wait until the target process has resumed before accepting new calls to Command. Before this if a 'continue' was immediately followed by a 'halt' the 'halt' could be processed before the 'continue'. Fixes #1608 Fixes #2216 * service/rpccommon: fix DeepSource issues
-
由 polinasok 提交于
* service/dap: clarify default attributes behavior with tests * Minor clean-up post-merge Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
由 polinasok 提交于
* service/dap: support auto-loading of unloaded interfaces * Make DeepSource happy * Don't set reference if data failed to auto-load * Use frame-less expressions * Refine interface recursion capping test case Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
由 Alessandro Arzilli 提交于
- remove github workflow for testing macOS/amd64 that is now covered by TeamCity - fix DeepSource glob patterns to actually match what they are intended to match (did the interpretation change?) - disable some cgo tests on darwin/arm64
-
- 05 3月, 2021 4 次提交
-
-
由 Luis Gabriel Gomez 提交于
-
由 Alessandro Arzilli 提交于
The eh_frame section is similar to debug_frame but uses a slightly different format. Gcc and clang by default only emit eh_frame.
-
由 Alessandro Arzilli 提交于
Delve represents registerized variables (fully or partially) using compositeMemory, implementing proc.(*compositeMemory).WriteMemory is necessary to make SetVariable and function calls work when Go will switch to using the register calling convention in 1.17. This commit also makes some refactoring by moving the code that converts between register numbers and register names out of pkg/proc into a different package.
-
由 nd 提交于
-
- 04 3月, 2021 1 次提交
-
-
由 derekparker 提交于
-
- 02 3月, 2021 1 次提交
-
-
由 Alessandro Arzilli 提交于
Also adds a disabled tip builder for the next-version support branch.
-
- 25 2月, 2021 2 次提交
-
-
由 polinasok 提交于
* Avoid double removal of temp binary * Add back accidentally removed empty line * Simplify regex * Use unique build output directories in test cases * Recover TestLaunchDebugRequest hidden logging and refine error check * Special case access-denied error on Windows * Remove special case for access denied on Windows * Increase remove delay on Win Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
由 Alessandro Arzilli 提交于
* TeamCity: add linux/arm64/tip configuration So that it can be tested when we make the next-version-support-branch. * tests: disable failing cgo tests on arm64
-
- 24 2月, 2021 6 次提交
-
-
由 Dmitry Neverov 提交于
-
由 Dmitry Neverov 提交于
-
由 Alessandro Arzilli 提交于
When cgo is used the address of the g struct is saved on the special register TPIDR_EL0. Because executing C code could overwrite the contents of R28 that normally contains the address of g we should read it from TPIDR_EL0 instead when runtime.iscgo is set.
-
由 Dmitry Neverov 提交于
-
由 polinasok 提交于
* Detect and report unloaded variables * Make DeepSource happy Co-authored-by: NPolina Sokolova <polinasok@users.noreply.github.com>
-
由 Alessandro Arzilli 提交于
-