- 31 8月, 2018 1 次提交
-
-
由 aarzilli 提交于
Add a flag to Stackframe that indicates where the stack frame is the bottom-most frame of the stack. This allows clients to know whether the stack trace terminated normally or if it was truncated because the maximum depth was reached. Add a truncation message to the 'stack' command.
-
- 25 7月, 2018 1 次提交
-
-
由 aarzilli 提交于
Adds -defer flag to the stack command that decorates the stack traces by associating each stack frame with its deferred calls. Reworks proc.next to use this feature instead of using proc.DeferPC, laying the groundwork to implement #1240.
-
- 12 6月, 2018 1 次提交
-
-
由 aarzilli 提交于
-
- 27 3月, 2018 1 次提交
-
-
由 aarzilli 提交于
Go 1.10 added inlined calls to debug_info, this commit adds support for DW_TAG_inlined_call to delve, both for stack traces (where inlined calls will appear as normal stack frames) and to correct the behavior of next, step and stepout. The calls to Next and Frame of stackIterator continue to work unchanged and only return real stack frames, after reading each line appendInlinedCalls is called to unpacked all the inlined calls that involve the current PC. The fake stack frames produced by appendInlinedCalls are distinguished from real stack frames by having the Inlined attribute set to true. Also their Current and Call locations are treated differently. The Call location will be changed to represent the position inside the inlined call, while the Current location will always reference the real stack frame. This is done because: * next, step and stepout need to access the debug_info entry of the real function they are stepping through * we are already manipulating Call in different ways while Current is just what we read from the call stack The strategy remains mostly the same, we disassemble the function and we set a breakpoint on each instruction corresponding to a different file:line. The function in question will be the one corresponding to the first real (i.e. non-inlined) stack frame. * If the current function contains inlined calls, 'next' will not set any breakpoints on instructions that belong to inlined calls. We do not do this for 'step'. * If we are inside an inlined call that makes other inlined functions, 'next' will not set any breakpoints that belong to inlined calls that are children of the current inlined call. * If the current function is inlined the breakpoint on the return address won't be set, because inlined frames don't have a return address. * The code we use for stepout doesn't work at all if we are inside an inlined call, instead we call 'next' but instruct it to remove all PCs belonging to the current inlined call.
-
- 20 3月, 2018 1 次提交
-
-
由 Josh Soref 提交于
-
- 27 1月, 2018 1 次提交
-
-
由 aarzilli 提交于
-
- 06 1月, 2018 1 次提交
-
-
由 aarzilli 提交于
The runtime calls into g0 in many places, not necessarily using runtime.systemstack or runtime.asmcgocall. One example of this is the call to runtime.newstack inside runtime.morestack. If we stop the process while one goroutine is executing runtime.newstack we would be unable to fully scan its stack because we don't know that we have to switch back to the goroutine stack after runtime.newstack. Instead of tracking down every possible way that the runtime switches to g0 we switch to the goroutine stack immediately after the top of the stack, unless cgo is being executed on the systemstack. Fixes #1066
-
- 21 12月, 2017 1 次提交
-
-
由 aarzilli 提交于
Adds a configuration option (show-location-expr) that when activated will cause the whatis command to also print the DWARF location expression for a variable.
-
- 14 12月, 2017 1 次提交
-
-
由 aarzilli 提交于
-
- 29 11月, 2017 1 次提交
-
-
由 aarzilli 提交于
When creating a stack trace we should switch between the goroutine stack and the system stack (where cgo code is executed) as appropriate to reconstruct the logical stacktrace. Goroutines that are currently executing on the system stack will have the SystemStack flag set, frames of the goroutine stack will have a negative FrameOffset (like always) and frames of the system stack will have a positive FrameOffset (which is actually just the CFA value for the frame). Updates #935
-
- 22 11月, 2017 1 次提交
-
-
由 aarzilli 提交于
These are emitted by C compilers but also by the current development version of the go compiler with the dwarflocationlists flag.
-
- 18 11月, 2017 2 次提交
-
-
由 aarzilli 提交于
Since it's just a scratchpad to calculate the new set of registers it makes more sense to have it as a local variable in Next and advanceRegs.
-
由 aarzilli 提交于
Instead of only tracking a few cherrypicked registers in stack.go track all DWARF registers. This is needed for cgo code and for the locationlists emitted by go in 1.10: * The debug_frame sections emitted by C compilers can not be used without tracking all registers * the loclists emitted by go1.10 need all registers of a frame to be interpreted.
-
- 04 11月, 2017 1 次提交
-
-
由 aarzilli 提交于
gosymtab and gopclntab only contain informations about go code, linked C code isn't there, we should use debug_line instead to also cover C. Updates #935
-
- 29 7月, 2017 1 次提交
-
-
由 Derek Parker 提交于
Instead of panicing for sending on a closed channel, detect that the process has exited and return a proper error message. This patch also cleans up some spots where the Pid is omitted from the error. Fixes #920
-
- 27 7月, 2017 1 次提交
-
-
由 aarzilli 提交于
When there's a error reading the stack trace the call stack itself could be corrupted and we should return the partial stacktrace that we have. Fixes #868
-
- 17 5月, 2017 1 次提交
-
-
由 Alessandro Arzilli 提交于
Before this commit our temp breakpoints only checked that we would stay on the same goroutine. However this isn't enough for recursive functions we must check that we stay on the same goroutine AND on the same stack frame (or, in the case of the StepOut breakpoint, the previous stack frame). This commit: 1. adds a new synthetic variable runtime.frameoff that returns the offset of the current frame from the base of the call stack. This is similar to runtime.curg 2. Changes the condition used for breakpoints on the lines of the current function to check that runtime.frameoff hasn't changed. 3. Changes the condition used for breakpoints on the return address to check that runtime.frameoff corresponds to the previous frame in the stack. 4. All other temporary breakpoints (the step-into breakpoints and defer breakpoints) remain unchanged. Fixes #828
-
- 22 4月, 2017 2 次提交
-
-
由 aarzilli 提交于
- moved target.Interface into proc as proc.Process - rename proc.IThread to proc.Thread - replaced interfaces DisassembleInfo, Continuable and EvalScopeConvertible with Process. - removed superfluous Gdbserver prefix from types in the gdbserial backend. - removed superfluous Core prefix from types in the core backend.
-
由 aarzilli 提交于
- move native backend to pkg/proc/native - move gdbserver backend to pkg/proc/gdbserial - move core dumps backend to pkg/proc/core
-
- 19 4月, 2017 1 次提交
-
-
由 aarzilli 提交于
-
- 14 4月, 2017 1 次提交
-
-
由 Alessandro Arzilli 提交于
* proc: Refactor stackIterator to use memoryReadWriter and BinaryInfo * proc: refactor EvalScope to use memoryReadWriter and BinaryInfo * proc: refactor Disassemble to use memoryReadWriter and BinaryInfo
-
- 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
-
- 14 3月, 2017 1 次提交
-
-
由 dr2chase 提交于
Stack barriers were removed in Go 1.9, and thus code that expected various stack-barrier-related symbols to exist does not find them. Check for their absence and do not crash when they are missing. Disable stack-barrier-handling test for 1.9 and beyond. Fixes #754.
-
- 23 2月, 2017 1 次提交
-
-
由 aarzilli 提交于
On Windows we can sometimes encounter threads stopped in locations for which we do not have entries in debug_frame. These cases seem to be due to calls to Windows API in the go runtime, we can still produce a (partial) stack trace in this circumstance by following frame pointers (starting with BP). We still prefer debug_frame entries when available since go functions do not have frame pointers before go1.8.
-
- 17 2月, 2017 1 次提交
-
-
由 Alessandro Arzilli 提交于
The PC we have is relative to the first instruction after the CALL instruction currently being executed. Anyone watching a disassembly will understand what's happening if we report the return PC, but reporting the first PC of the current line is useless and confusing.
-
- 09 2月, 2017 2 次提交
-
-
由 Derek Parker 提交于
-
由 Derek Parker 提交于
-
- 08 2月, 2017 1 次提交
-
-
由 Alessandro Arzilli 提交于
* service/rpccommon: fixed typo * proc: test parseG while target is in runtime.deferreturn runtime.deferreturn will change the value of curg._defer.fn in such a way that if the target is stopped at just the right instruction it may crash an incorrect implementation of parseG * proc/stack: handle stack barriers correctly Correctly handle stack barriers insterted during garbage collection.
-
- 20 12月, 2016 1 次提交
-
-
由 aarzilli 提交于
Adds ability to load x87, SSE and AVX registers. Fixes #666
-
- 03 7月, 2016 1 次提交
-
-
- 25 6月, 2016 1 次提交
-
-
由 aarzilli 提交于
-
- 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.
-
- 14 5月, 2016 1 次提交
-
-
由 Nan Xiao 提交于
Fix typo.
-
- 29 3月, 2016 4 次提交
-
-
由 aarzilli 提交于
proc.(*Thread).Scope fails if we can find a FDE but PCToLine returns nothing
-
由 aarzilli 提交于
-
由 aarzilli 提交于
- made GoroutineStacktrace a method of struct G - made stacktrace a method of StackIterator - renamed StackIterator to stackIterator - factored out logic to obtain a stackIterator from a goroutine that's used by both (*G).Stacktrace and by (*G).UserCurrent
-
由 aarzilli 提交于
Instead of returning an error when FDE of a frame can not be found, just truncate the stack trace. Fixes #462
-
- 18 3月, 2016 1 次提交
-
-
由 Hubert Krauze 提交于
-
- 02 2月, 2016 1 次提交
-
-
由 aarzilli 提交于
-
- 10 1月, 2016 1 次提交
-
-
由 Derek Parker 提交于
-