- 11 4月, 2020 1 次提交
-
-
由 Derek Parker 提交于
This flag allows users on UNIX systems to set the tty for the program being debugged by Delve. This is useful for debugging command line applications which need access to their own TTY, and also for controlling the output of the debugged programs so that IDEs may open a dedicated terminal to show the output for the process.
-
- 03 4月, 2020 1 次提交
-
-
由 Derek Parker 提交于
Fixes #1310
-
- 01 4月, 2020 1 次提交
-
-
由 aarzilli 提交于
-
- 11 3月, 2020 1 次提交
-
-
由 Alessandro Arzilli 提交于
* proc,proc/*: move SelectedGoroutine to proc.Target, remove PostInitializationSetup moves SelectedGoroutine, SwitchThread and SwitchGoroutine to proc.Target, merges PostInitializationSetup with NewTarget. * proc,proc/*: add StopReason field to Target Adds a StopReason field to the Target object describing why the target process is currently stopped. This will be useful for the DAP server (which needs to report this reason in one of its requests) as well as making pull request #1785 (reverse step) conformant to the new architecture. * proc: collect NewTarget arguments into a struct
-
- 11 2月, 2020 1 次提交
-
-
由 Alessandro Arzilli 提交于
* tests: misc test fixes for go1.14 - math.go is now ambiguous due to changes to the go runtime so specify that we mean our own math.go in _fixtures - go list -m requires vendor-mode to be disabled so pass '-mod=' to it in case user has GOFLAGS=-mod=vendor - update version of go/packages, required to work with go 1.14 (and executed go mod vendor) - Increased goroutine migration in one development version of Go 1.14 revealed a problem with TestCheckpoints in command_test.go and rr_test.go. The tests were always wrong because Restart(checkpoint) doesn't change the current thread but we can't assume that when the checkpoint was taken the current goroutine was running on the same thread. * goversion: update maximum supported version * Makefile: disable testing lldb-server backend on linux with Go 1.14 There seems to be some incompatibility with lldb-server version 6.0.0 on linux and Go 1.14. * proc/gdbserial: better handling of signals - if multiple signals are received simultaneously propagate all of them to the target threads instead of only one. - debugserver will drop an interrupt request if a target thread simultaneously receives a signal, handle this situation. * dwarf/line: normalize backslashes for windows executables Starting with Go 1.14 the compiler sometimes emits backslashes as well as forward slashes in debug_line, normalize everything to / for conformity with the behavior of previous versions. * proc/native: partial support for Windows async preempt mechanism See https://github.com/golang/go/issues/36494 for a description of why full support for 1.14 under windows is problematic. * proc/native: disable Go 1.14 async preemption on Windows See https://github.com/golang/go/issues/36494
-
- 22 1月, 2020 1 次提交
-
-
由 Derek Parker 提交于
* pkg/proc: Introduce Target * pkg/proc: Remove Common.fncallEnabled Realistically we only block it on recorded backends. * pkg/proc: Move fncallForG to Target * pkg/proc: Remove CommonProcess Remove final bit of functionality stored in CommonProcess and move it to *Target. * pkg/proc: Add SupportsFunctionCall to Target
-
- 13 8月, 2019 1 次提交
-
-
由 Alessandro Arzilli 提交于
proc.Next and proc.Step will call, after setting their temp breakpoints, curthread.SetCurrentBreakpoint. This is intended to find if one of the newly created breakpoints happens to be at the same instruction that curthread is stopped at. However SetCurrentBreakpoint is intended to be called after a Continue and StepInstruction operation so it will also detect if curthread is stopped one byte after a breakpoint. If the instruction immediately preceeding the current instruction of curthread happens to: 1. have one of the newly created temp breakpoints 2. be one byte long SetCurrentBreakpoint will believe that we just hit that breakpoint and therefore the instruction should be repeated, and thus rewind the PC of curthread by 1. We should distinguish between the two uses of SetCurrentBreakpoint and disable the check for "just hit" breakpoints when inappropriate. Fixes #1656
-
- 05 1月, 2019 1 次提交
-
-
由 Derek Parker 提交于
The repository is being switched from the personal account github.com/derekparker/delve to the organization account github.com/go-delve/delve. This patch updates imports and docs, while preserving things which should not be changed such as my name in the CHANGELOG and in TODO comments.
-
- 16 11月, 2018 1 次提交
-
-
由 Derek Parker 提交于
This patch is a slight refactor to share more code used for genericprocess initialization. There will always be OS/backend specificinitialization, but as much as can be shared should be to preventduplicating of any logic (setting internal breakpoints, loading bininfo,etc).
-
- 09 11月, 2018 1 次提交
-
-
由 Derek Parker 提交于
Adds a config file option to allow specifying a list of directories to search in when looking for seperate external debug info files. Fixes #1353
-
- 12 10月, 2018 1 次提交
-
-
由 aarzilli 提交于
Support for position independent executables (PIE) on the native linux backend, the gdbserver backend on linux and the core backend. Also implemented in the windows native backend, but it can't be tested because go doesn't support PIE on windows yet.
-
- 03 10月, 2018 1 次提交
-
-
由 aarzilli 提交于
On macOS 10.14 Apple changed the command line tools so that system headers now need to be manually installed. Instead of adding one extra install step to the install procedure add a build tag to allow compilation of delve without the native backend on macOS. By default (i.e. when using `go get`) this is how delve will be compiled on macOS, the make script is changed to enable compiling the native backend if the required dependencies have been installed. Insure that both configuration still build correctly on Travis CI and change the documentation to describe how to compile the native backend and that it isn't normally needed. Fixes #1359
-
- 20 9月, 2018 1 次提交
-
-
由 Derek Parker 提交于
Refactors some code, adds a bunch of docstrings and just generally fixes a bunch of linter complaints.
-
- 12 6月, 2018 1 次提交
-
-
由 aarzilli 提交于
Displays the return values of the current function when we step out of it after executing a step, next or stepout command. Implementation of this feature is tricky: when the function has returned the return variables are not in scope anymore. Implementing this feature requires evaluating variables that are out of scope, using a stack frame that doesn't exist anymore. We can't calculate the address of these variables when the next/step/stepout command is initiated either, because between that point and the time where the stepout breakpoint is actually hit the goroutine stack could grow and be moved to a different memory address.
-
- 19 5月, 2018 1 次提交
-
-
由 aarzilli 提交于
Change the linux verison of proc/native and proc/gdbserial (with debugserver) so that they let the target process use the terminal when delve is launched in headless mode. Windows already worked, proc/gdbserial (with rr) already worked. I couldn't find a way to make proc/gdbserial (with lldb-server) work. No tests are added because I can't think of a way to test for foregroundness of a process. Fixes #65
-
- 07 3月, 2018 4 次提交
-
-
由 aarzilli 提交于
The windows backend isn't using the halt field so it can be removed there. On linux it can be replaced with a parameter passed to trapWait.
-
由 aarzilli 提交于
Windows and macOS aren't using this field so move it to the os-specific thread struct and remove it from everything except linux.
-
由 aarzilli 提交于
-
由 aarzilli 提交于
the proper way to kill the target process is to pass true to Detach. Everything except old test code did that already.
-
- 08 2月, 2018 1 次提交
-
-
由 Matt Bauer 提交于
* Handle race between fork and task_for_pid On macOS a call to fork and a subsequent call to task_for_pid will race each other. This is because the macOS kernel assigns a new proc_t structure early but the new task, thread and uthread come much later. The function exec_mach_imgact in the XNU sources contains this logic. In a system under load or one with delays in fork processing (i.e. various security software), task_for_pid as currently called by Delve often returns the parent task. This can be seen by printing out the task number around line 86. In a normal system we would see three calls: -> ~/go/bin/dlv --listen=localhost:59115 --headless=true --api-version=2 --backend=native exec ./___main_go -- Task: 9731 Task: 9731 Task: 9731 API server listening at: 127.0.0.1:59115 This is the result on a system where the race is lost: -> ~/go/bin/dlv --listen=localhost:59115 --headless=true --api-version=2 --backend=native exec ./___main_go -- Task: 8707 Task: 10499 Task: 10499 could not launch process: could not get thread count In this latter case, task 8707 is the parent task. The child task of 10499 was desired and hence the error. This code change checks to make sure the returned task is not that of the parent. If it is, it retries. It's possible other macOS reported Delve issues are the result of this failed race. * proc: correct formatting
-
- 21 11月, 2017 1 次提交
-
-
由 aarzilli 提交于
Conditional breakpoints with unmet conditions would cause next and step to skip the line. This breakpoint changes the Kind field of proc.Breakpoint from a single value to a bit field, each breakpoint object can represent simultaneously a user breakpoint and one internal breakpoint (of which we have several different kinds). The breakpoint condition for internal breakpoints is stored in the new internalCond field of proc.Breakpoint so that it will not conflict with user specified conditions. The breakpoint setting code is changed to allow overlapping one internal breakpoint on a user breakpoint, or a user breakpoint on an existing internal breakpoint. All other combinations are rejected. The breakpoint clearing code is changed to clear the UserBreakpoint bit and only remove the phisical breakpoint if no other bits are set in the Kind field. ClearInternalBreakpoints does the same thing but clearing all bits that aren't the UserBreakpoint bit. Fixes #844
-
- 31 8月, 2017 1 次提交
-
-
由 aarzilli 提交于
Fixes #940
-
- 30 6月, 2017 1 次提交
-
-
由 Alessandro Arzilli 提交于
Windows doesn't actually have ptrace. Fixes #778
-
- 13 6月, 2017 1 次提交
-
-
由 aarzilli 提交于
RequestManualStop will run concurrently with trapWait, since one writes dbp.halt and the other reads it dbp.halt should be protected by a mutex. Updates #830
-
- 06 5月, 2017 1 次提交
-
-
由 Alessandro Arzilli 提交于
While implementing the gdbserial backend everything was changed to call Detach to "close" a process so that gdbserial could do its clean up in a single place. However the native implementation of Detach does not actually kill processes we launched. Fixes #821
-
- 22 4月, 2017 1 次提交
-
-
由 aarzilli 提交于
- move native backend to pkg/proc/native - move gdbserver backend to pkg/proc/gdbserial - move core dumps backend to pkg/proc/core
-
- 07 4月, 2017 1 次提交
-
-
由 Alessandro Arzilli 提交于
* proc: refactor BinaryInfo part of proc.Process to own type The data structures and associated code used by proc.Process to implement target.BinaryInfo will also be useful to support a backend for examining core dumps, split this part of proc.Process to a different type. * proc: compile support for all executable formats unconditionally So far we only compiled in support for loading the executable format supported by the host operating system. Once support for core files is introduced it is however useful to support loading in all executable formats, there is no reason why it shouldn't be possible to examine a linux coredump on windows, or viceversa. * proc: bugfix: do not resume threads on detach if killing * Replace BinaryInfo interface with BinInfo() method returning proc.BinaryInfo
-
- 29 3月, 2017 1 次提交
-
-
由 Alessandro Arzilli 提交于
Detach did not work for processes we attach to via PID. Linux: we were only detaching from the main thread, all threads are detached independently Windows: we must resume all threads before detaching. macOS: still broken. Updates #772
-
- 14 2月, 2017 1 次提交
-
-
由 Alessandro Arzilli 提交于
Fixes #732
-
- 09 2月, 2017 3 次提交
-
-
由 Koichi Shiraishi 提交于
Signed-off-by: NKoichi Shiraishi <zchee.io@gmail.com>
-
由 Derek Parker 提交于
-
由 Derek Parker 提交于
-
- 23 12月, 2016 1 次提交
-
-
由 Alessandro Arzilli 提交于
* service/debugger: Restore breakpoints using file:line on restart Restoring by address can cause the breakpoint to be inserted in the middle of an instruction if the executable file has changed. * terminal: Warn of stale executable when printing source
-
- 17 12月, 2016 1 次提交
-
-
由 aarzilli 提交于
Fixes #645
-
- 02 11月, 2016 1 次提交
-
-
由 Evgeny L 提交于
* proc: Add `wd` to Launch This change adds the `wd` arg which specify working directory of the program. Fixes #295 * service/debugger: Add `Wd` field to debugger.Config This change adds the `Wd` field which specify working directory of the program launched by debugger. Fixes #295 * service: Add `Wd` to service.Config This change adds the `Wd` field which specify working directory of the program debugger will launch. Fixes #295 * cmd/dlv: Add `Wd` flag This change adds `Wd` flag which specify working directory of the program which launched by debugger. Fixes #295 * only set the Linux working directory if it is set, stub out param in darwin and windows * set working directory for Windows https://godoc.org/golang.org/x/sys/windows#CreateProcess https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx * Windows workingDir must be an *uint16 * attempt to chdir on darwin via @yuntan * proc/exec_darwin.c: fix working directory for darwin * Add tests to check if working directory works. * Fix darwin implementation of fork/exec, which paniced if child fork returned. * cmd, service: rename Wd to WorkingDir
-
- 06 7月, 2016 1 次提交
-
-
由 Alessandro Arzilli 提交于
Patch https://go-review.googlesource.com/23085 has been merged so we can go back to using golang.org/x/debug/.
-
- 30 6月, 2016 1 次提交
-
-
由 aarzilli 提交于
This provides a better error message when the user tries to run dlv debug on a directory that does not contain a main package, when `dlv exec` is used with a source file. Additionally the architecture of the executable is checked as suggested by @alexbrainman in #443. Fixes #509
-
- 30 5月, 2016 1 次提交
-
-
由 Alessandro Arzilli 提交于
* tests: update to cope with go1.7 SSA compiler * de-vendored golang.org/x/debug/dwarf We need our own tweaked version * dwarf/debug/dwarf: always use the entry's name attribute Using the name attribute leads to better type names as well as fixes inconsistencies between 1.5, 1.6 and 1.7. * proc: Updated loadInterface to work with go1.7 go1.7 changed the internal representation of types, removing the string field from runtime._type. Updated loadInterface to use the new str field.
-
- 13 4月, 2016 1 次提交
-
-
由 Derek Parker 提交于
-
- 25 1月, 2016 1 次提交
-
-
由 Derek Parker 提交于
This patch modifies the `step` command to step to the next source line, stepping into any function encountered along the way. Fixes #360
-