- 11 3月, 2020 2 次提交
-
-
由 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
-
由 chainhelen 提交于
Implement debugging function for 386 on linux with reference to AMD64. There are a few remaining problems that need to be solved in another time. 1. The stacktrace of cgo are not exactly as expected. 2. Not implement `core` for now. 3. Not implement `call` for now. Can't not find `runtime·debugCallV1` or similar function in $GOROOT/src/runtime/asm_386.s. Update #20
-
- 10 3月, 2020 1 次提交
-
-
由 Alessandro Arzilli 提交于
* proc/native/linux: only set breakpoints on threads that receive SIGTRAP * proc/native/linux: do not call (*Thread).Stopped inside (*Process).stop (*Thread).Stopped is slow because it needs to open, read and parse a file in /proc, we don't actually need to do that, we can just rely on the value of Thread.os.running. Benchmark before: BenchmarkConditionalBreakpoints-4 1 12476166303 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 10403533675 ns/op Conditional breakpoint evaluation: 1.24ms -> 1ms Updates #1549
-
- 06 3月, 2020 1 次提交
-
-
由 Derek Parker 提交于
-
- 03 3月, 2020 1 次提交
-
-
由 a 提交于
Disables async preemption on macOS Fixes #1905
-
- 01 3月, 2020 1 次提交
-
-
由 Josh Stone 提交于
This change adds `ProcessVmRead` and `ProcessVmWrite` wrappers around the syscalls `process_vm_readv` and `process_vm_writev`, available since Linux 3.2. These follow the same permission model as `ptrace`, but they don't actually require being attached, which means they can be called directly from any thread in the debugger. They also use `iovec` to write entire blocks at once, rather than having to peek/poke each `uintptr`. These wrappers are used in `Thread.ReadMemory` and `WriteMemory`, still falling back to `ptrace` if that fails for any reason. Notably, `process_vm_writev` respects memory protection, so it can't modify read-only memory like `ptrace`. This frequently occurs when writing breakpoints in read-only `.text`, so to avoid a lot of wasted `EFAULT` calls, we only try `process_vm_writev` for larger writes.
-
- 26 2月, 2020 1 次提交
-
-
由 chainhelen 提交于
-
- 25 2月, 2020 3 次提交
-
-
由 Alessandro Arzilli 提交于
Adds an optional scope prefix to the `regs` command which allows printing registers for any stack frame (as long as they were somehow saved). Issue #1838 is not yet to be closed since we are still not recovering the registers of a segfaulting frame. Updates #1838
-
由 Alessandro Arzilli 提交于
As we rearrange the code and the Go compiler changes the error message returned by the compiler on unsupported architectures will change too, making it un-googlable. Since the error message tends to be rather obscure too this regularly confuses newbies. This is an effort to make the error message for unsupported GOOS/GOARCH combinations the same across all unsupported combinations and to make it more user friendly. Directories containing Go source code are supposed to contain a single package. This property happens to be checked by cmd/go itself so it will happen even before the syntax is fully checked and therefore has a high probability of being the first (and only) error message being print. Here we take advantage of this by adding to the pkg/proc/native directory a file with a bad package line that only gets compiled in on unsupported GOOS/GOARCH combinations. At present the error message for compiling Delve on unsupported systems will be: service/debugger/debugger.go:21:2: found packages native (proc.go) and your_operating_system_and_architecture_combination_is_not_supported_by_delve (support_sentinel.go) in $PATH_TO_DELVE/pkg/proc/native
-
由 chainhelen 提交于
Avoid always showing `no G executing on thread 0` when ErrNoGoroutine on g0 stack in GetG.
-
- 21 2月, 2020 1 次提交
-
-
由 Alessandro Arzilli 提交于
Go 1.8 has been out of date for a while and the code to support it is potentially dangerous if a future version of Go removes the runtime types from debug_info and also changes their representation.
-
- 20 2月, 2020 2 次提交
-
-
由 Derek Parker 提交于
Removes the restriction that the DWARF type for the receiver of a method must be a TypeDef. This seems reasonable in practice, but it turns out Go DWARF does not consider ``` type X int ``` to be a typedef. This patch also allows for calling a method where the receiver is not used or passed in, such as: ``` func (_ X) Method() { println("why") } ```
-
由 chainhelen 提交于
Avoid panic if start addr is greater than end addr when disasm.
-
- 18 2月, 2020 2 次提交
-
-
由 ossdev07 提交于
* proc/native: optimize native.status through buffering (#1865) Benchmark before: BenchmarkConditionalBreakpoints-4 1 15649407130 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 14586710018 ns/op Conditional breakpoint evaluation 1.56ms -> 1.45ms Updates #1549 * proc/core: Review Comments Incorporated Signed-off-by: Nossdev07 <ossdev@puresoftware.com> Co-authored-by: NAlessandro Arzilli <alessandro.arzilli@gmail.com>
-
由 Alessandro Arzilli 提交于
runtime.g is a large and growing struct, we only need a few fields. Instead of using loadValue to load the full contents of g, cache its memory and then only load the fields we care about. Benchmark before: BenchmarkConditionalBreakpoints-4 1 14586710018 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 12476166303 ns/op Conditional breakpoint evaluation: 1.45ms -> 1.24ms Updates #1549
-
- 16 2月, 2020 1 次提交
-
-
由 Alessandro Arzilli 提交于
Benchmark before: BenchmarkConditionalBreakpoints-4 1 15649407130 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 14586710018 ns/op Conditional breakpoint evaluation 1.56ms -> 1.45ms Updates #1549
-
- 14 2月, 2020 2 次提交
-
-
由 Derek Parker 提交于
Instead of reloading the registers for every thread every time the process executes, reload the registers on demand for individual threads and memoize the result.
-
由 Alessandro Arzilli 提交于
The stacktrace code occasionally needs the value of g.m.g0.sched.sp to switch stacks. Since this is only needed rarely and calling parseG is relatively expensive we should delay doing it until we know it will be needed. Benchmark before: BenchmarkConditionalBreakpoints-4 1 17326345671 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 15649407130 ns/op Reduces conditional breakpoint latency from 1.7ms to 1.56ms. Updates #1549
-
- 13 2月, 2020 1 次提交
-
-
由 Alessandro Arzilli 提交于
A significant amount of time is spent generating the string representation for the proc.Registers object of each thread, since this field is rarely used (only when the Registers API is called) it should be generated on demand. Also by changing the internal representation of proc.Register to be closer to that of op.DwarfRegister it will help us implement #1838 (when Delve will need to be able to display the registers of an internal frame, which we currently represent using op.DwarfRegister objects). Benchmark before: BenchmarkConditionalBreakpoints-4 1 22292554301 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 17326345671 ns/op Reduces conditional breakpoint latency from 2.2ms to 1.7ms. Updates #1549, #1838
-
- 11 2月, 2020 2 次提交
-
-
由 chainhelen 提交于
-
由 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
-
- 29 1月, 2020 1 次提交
-
-
由 chainhelen 提交于
-
- 28 1月, 2020 2 次提交
- 27 1月, 2020 1 次提交
-
-
由 chainhelen 提交于
-
- 23 1月, 2020 1 次提交
-
-
由 chainhelen 提交于
-
- 22 1月, 2020 4 次提交
-
-
由 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
-
由 hengwu0 提交于
* proc: separate amd64-arch code separate amd64 code about stacktrace, so we can add arm64 stacktrace code. * proc: implemente stacktrace of arm64 * delve now can use stack, frame commands on arm64-arch debug. Co-authored-by: Ntykcd996 <tang.yuke@zte.com.cn> Co-authored-by: Nhengwu0 <wu.heng@zte.com.cn> * test: remove skip-code of stacktrace on arm64 * add LR DWARF register and remove skip-code for fixed tests * proc: fix the Continue command after the hardcoded breakpoint on arm64 Arm64 use hardware breakpoint, and it will not set PC to the next instruction like amd64. We should move PC in both runtime.breakpoints and hardcoded breakpoints(probably cgo). * proc: implement cgo stacktrace on arm64 * proc: combine amd64_stack.go and arm64_stack.go file * proc: reorganize the stacktrace code * move SwitchStack function arch-related * fix Continue command after manual stop on arm64 * add timeout flag to make.go to enable infinite timeouts Co-authored-by: Naarzilli <alessandro.arzilli@gmail.com> Co-authored-by: Nhengwu0 <wu.heng@zte.com.cn> Co-authored-by: Ntykcd996 <56993522+tykcd996@users.noreply.github.com> Co-authored-by: NAlessandro Arzilli <alessandro.arzilli@gmail.com>
-
由 Dmitry Neverov 提交于
-
由 Dmitry Neverov 提交于
Labels can help in identifying a particular goroutine during debugging. Fixes #1763
-
- 17 1月, 2020 1 次提交
-
-
由 aarzilli 提交于
Adds a cache mapping goroutine IDs to goroutine objects, this allows speeding up FindGoroutine and makes commands like 'goroutines -t' not be accidentally quadratic in the number of goroutines.
-
- 14 1月, 2020 1 次提交
-
-
由 Alex Brainman 提交于
Specifically, make sure that both DebugActiveProcess and WaitForDebugEvent Windows APIs are executed on the same thread. Otherwise WaitForDebugEvent fails with ERROR_INVALID_HANDLE as per its documentation https://docs.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-waitfordebugevent '... Only the thread that created the process being debugged can call WaitForDebugEvent. ...' Fixes #1825
-
- 10 1月, 2020 4 次提交
-
-
由 aarzilli 提交于
Due to a bug in the Go compiler midstack inlined calls do not report their ranges correctly. We can't check if an address is in the range of a DIE by simply looking at that DIE's range, we should also recursively check the DIE's children's ranges. Also fixes the way stacktraces of midstack inlined calls are reported (they used to be inverted, with the deepest inlined stack frame reported last). Fixes #1795
-
由 aarzilli 提交于
Adds an API call that returns a list of packages contained in the program and the files that were used to build them, and also a best guess at which filesystem directory contained the package when it was built. This can be used by IDEs to map file paths if the debugging environment doesn't match the build environment exactly.
-
由 aarzilli 提交于
When a line has instructions associated but none of them have is_stmt set LineToPC and LineToPCIn should behave in the same way. Fixes #1817
-
由 chainhelen 提交于
Change `copy form` into `copy from`.
-
- 03 1月, 2020 4 次提交
-
-
由 aarzilli 提交于
-
由 aarzilli 提交于
When attaching to a process in linux ElfUpdateSharedObjects will be called for the first time during the call to updateThreadList, unfortunately it won't do anything because the dynamic section of the base elf executable needs to have been read first and that's done when we initialize the BinaryInfo object (which happens later during the call to initialize).
-
由 aarzilli 提交于
Remove build tags from disassembler code, move architecture specific functionality inside proc.Arch. This is necessary because Delve should be able to debug corefiles cross-platform.
-
由 aarzilli 提交于
Updates #1802
-