- 09 11月, 2018 3 次提交
-
-
由 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
-
由 Derek Parker 提交于
-
由 Derek Parker 提交于
-
- 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.
-
- 20 9月, 2018 1 次提交
-
-
由 Derek Parker 提交于
Refactors some code, adds a bunch of docstrings and just generally fixes a bunch of linter complaints.
-
- 30 8月, 2018 1 次提交
-
-
由 aarzilli 提交于
Normally variables that have a named struct as a type will get a typedef entry as their type, sometimes however the Go linker will decide to use the DW_TAG_structure_type entry instead. For consistency always wrap a struct type into a typedef when we are creating a new variables (see comment in newVariable for exceptions). This fixes a bug where it would be impossible to call methods on a global variable.
-
- 16 8月, 2018 1 次提交
-
-
由 aarzilli 提交于
-
- 08 8月, 2018 1 次提交
-
-
由 Derek Parker 提交于
This patch makes it so inlined functions are returned in the function list, and also allows users to set breakpoints on the call site of inlined functions. Fixes #1261
-
- 14 7月, 2018 1 次提交
-
-
由 aarzilli 提交于
Implements the function call injection protocol introduced in go 1.11 by https://go-review.googlesource.com/c/go/+/109699. This is only the basic support, see TODO comments in pkg/proc/fncall.go for a list of missing features. Updates #119
-
- 23 6月, 2018 1 次提交
-
-
由 aarzilli 提交于
Go1.11 switched to the zlib-gnu compression format for debug sections. Change proc and and a test in dwarf/line to support this change. Also deletes some dead code from pkg/proc/bininfo.go that hadn't been used in a long time.
-
- 22 6月, 2018 1 次提交
-
-
由 Sergio Lopez 提交于
To save disk space, some distributions strip the debugging information from the binaries, putting it in separate files, usually distributed in separate packages. To locate the file containing the debug information for a certain binary, an ELF note named ".note.gnu.build-id" is added to the latter, which contains a header and a build identification. This identification can be used to compose a path with this form: /usr/lib/debug/.build-id/BUILDID[:2]/BUILDID[2:].debug With this patch, if Delve can't find the debug information in the main binary, it'll try to locate and parse ".note.gnu.build-id", to compose and attempt to open a path with the format described above. Fixes #1206
-
- 12 6月, 2018 2 次提交
-
-
由 aarzilli 提交于
go1.11 adds a new extended attribute to all type DIEs containing the address of the corresponding runtime._type struct, use this attribute to find the DIE of the concrete type of interface variables when available.
-
由 aarzilli 提交于
The offset of G changed in go1.11 from 0x8a0 to 0x30. See: https://github.com/golang/go/issues/23617
-
- 24 5月, 2018 1 次提交
-
-
由 Sergio Lopez 提交于
'dwz' is a tool that reduces the size of DWARF sections by deduplicating symbols. The deduplicated symbols are moved from their original 'compile unit' to a 'partial unit', which is then referenced from its original location with an 'imported unit' tag. In the case of Go binaries, all symbols are located in a single 'compile unit', and the name of each symbol contains a reference to its package, so 'dwz' is not able to deduplicate them. But still, some C symbols included in the binary are deduplicated, which also alters the structure of the DWARF sections, making delve unable to parse them (crashing in the attempt). While it would've been possible to simply ignore the C symbols, or blindly loading all then into BinaryInfo members (packageVars, Functions...), for correctness sake this change tries to do the right thing, staging symbols into temporary partialUnit objects, moving them to BinaryInfo when they are actually requested by a 'imported unit' tag.
-
- 16 5月, 2018 1 次提交
-
-
由 Jay Mundrawala 提交于
Go seems to be generating multiple compilation units that have the same file. I think this happens for functions that get inlined. Without this patch, those inlined functions break the ability to set a breakpoint at other lines in the file. I was able to load the same binary in gdb and set a breakpoints throughout the file without issue. ``` ➜ objdump --dwarf=decodedline automate-gateway | grep handler/users.go .../handler/users.go:[++] s/.../handler/users.go 20 0xb6dd88 .../handler/users.go:[++] s/.../handler/users.go 20 0xb6e50f .../handler/users.go:[++] s/automate-gateway/handler/users.go 32 0xb66640 ``` Inlined functions are still a little weird. setting a breakpoint on a function that gets inlined picks the first occurence. That being said, I think delve should still do something reasonable for the rest of the lines in the file.
-
- 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.
-
- 23 3月, 2018 1 次提交
-
-
由 aarzilli 提交于
updates vendored version of x86asm, adds a symbol lookup function to pass to the disassembler. This will show global symbol names in the disassembly like go tool objdump does.
-
- 14 2月, 2018 1 次提交
-
-
由 Alessandro Arzilli 提交于
debug_info entries can use DW_AT_abstract_origin to inherit the attributes of another entry, supporting this attribute is necessary to support DW_TAG_inlined_subroutine. Go, starting with 1.10, emits DW_TAG_inlined_subroutine entries when inlining is enabled.
-
- 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 2 次提交
- 22 11月, 2017 2 次提交
- 04 11月, 2017 2 次提交
-
-
由 aarzilli 提交于
1. Use a slice instead of a map to access standard and extended opcodes (reduces BenchmarkStateMachine from ~12ms/op to ~7ms/op) 2. Cache StateMachine values for the entry point of functions.
-
由 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
-
- 31 8月, 2017 1 次提交
-
-
由 aarzilli 提交于
Fixes #940
-
- 02 8月, 2017 1 次提交
-
-
由 aarzilli 提交于
Splits out type parsing and go-specific Type hierarchy from x/debug/dwarf, replace x/debug/dwarf with debug/dwarf everywhere, remove x/debug/dwarf from vendoring.
-
- 19 7月, 2017 1 次提交
-
-
由 Alessandro Arzilli 提交于
Variable lookup is slow because it requires a full scan of debug_info to check for package variables, this doesn't matter much in interactive use but can slow down evaluation of breakpoint conditions significantly. Providing benchmark proof for this is hard since this effect doesn't show for small programs with small debug_info sections.
-
- 22 6月, 2017 1 次提交
-
-
由 heschik 提交于
When a Go program is externally linked, the external linker is responsible for picking the TLS offset. It records its decision in the runtime.tlsg symbol. Read the offset from that rather than guessing -16. This implementation causes a regression: 1.4 and earlier will no longer work.
-
- 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
-
- 19 4月, 2017 1 次提交
-
-
由 aarzilli 提交于
-
- 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
-