Commit Graph

10 Commits

Author SHA1 Message Date
Derek Parker
a208c89719 *: Use structured logging
Implements structured logging via Logrus. This gives us a logger per
boundry that we care about, allowing for easier parsing of logs if users
have more than one log option enabled. Also, cleans up a lot of
conditionals in the code by simply silencing the logger at creation as
opposed to conditionally logging everywhere.
2018-06-22 09:45:10 +02:00
aarzilli
5155ef047f proc,dwarf/line: support is_stmt and prologue_end flags
Go1.11 uses the is_stmt flag of .debug_line to communicate which
assembly instructions are good places for breakpoints, we should
respect this flag.

These changes were introduced by:
* https://go-review.googlesource.com/c/go/+/102435/

Additionally when setting next breakpoints ignore all PC addresses that
belong to the same line as the one currently under at the cursor. This
matches the behavior of gdb and avoids stopping multiple times at the
heading line of a for statement with go1.11.

Change: https://go-review.googlesource.com/c/go/+/110416 adds the
prologue_end flag to the .debug_line section to communicate the end of
the stack-split prologue. We should use it instead of pattern matching
the disassembly when available.

Fixes #550

type of interfaces
'c7cde8b'.
2018-06-11 11:09:02 -07:00
Josh Soref
1d3b41f64e all: Spelling 2018-03-20 11:05:35 +01:00
aarzilli
07c716818e proc/test: miscellaneous test changes for go1.10 2017-12-13 12:18:18 -08:00
aarzilli
73a39b985a pkg/dwarf/line: improve performance
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.
2017-11-03 20:57:04 +01:00
aarzilli
6d40517944 proc: replace all uses of gosymtab/gopclntab with uses of debug_line
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
2017-11-03 20:57:04 +01:00
Alessandro Arzilli
b47d6a0998 dwarf/line: load PE files correctly in test (#894)
Fixes #885
2017-06-26 11:09:51 -07:00
Hyang-Ah Hana Kim
5bd46f34be vendor: update vendored packages (#791)
* pkg/proc: use golang.org/x/arch/x86/x86asm

instead of rsc.io/x86/x86asm

* pkg/dwarf: migrate to github.com/pkg/profile

from github.com/davecheney/profile

* scripts: keep script go files from being considered for the build

scripts/gen-*.go files are scripts for generating documentation
files and don't follow the typical Go package layout. Expected
usage is like

   go run scripts/gen-cli-docs.go

* vendor: update vendored packages

There were many changes in delve, and go tool chains since last
vendored package update. I just rerun godpes from scratch.

$ rm vendor/*
$ rm Godeps/Godeps.json
$ go list ./... | grep -v /vendor/ | grep -v /scripts/ | go get -u -t
$ go get -u github.com/mattn/go-colorable
$ go get -u github.com/mattn/go-isatty
$ go list ./... | grep -v /vendor/ | grep -v /scripts/ | godeps save
2017-04-17 14:13:00 -07:00
Derek Parker
f97bceaf48 Fix benchmark in DWARF line parser test (#737) 2017-02-13 22:24:54 +01:00
Derek Parker
53f0d24057 Move top-level packages into pkg 2017-02-08 12:17:19 -08:00