Commit Graph

977 Commits

Author SHA1 Message Date
aarzilli
0f4b5150c3 proc, terminal: stepout command
Command to step out of the currently executing function.

Implements #358
2016-10-23 17:09:26 +02:00
Alessandro Arzilli
54d3eab63a prettyprint: Print type of the elements of arrays of interface type (#591) 2016-10-21 22:14:43 -07:00
Alessandro Arzilli
6e882c50fa debugger/locations: prioritize exact matches of function names (#651)
If the location specification matches the name of a function exactly
return that function as a match event if the expression matches other
functions as well.

Without this some functions, like math/rand.Intn are unmatchable.
2016-10-21 22:04:03 -07:00
Alessandro Arzilli
f6e8fb37a4 proc: changed windows backend to deal with simultaneous breakpoints (#598)
* proc: changed windows backend to deal with simultaneous breakpoints

* bugfix: forgot to add windowsPrologue3 to the prologues list in e4c7df1

* Tolerate errors returned by Stacktrace in TestStacktraceGoroutine.

* bugfix: proc: propagate debug events we don't cause back to the target process

Fixes: #594

* proc: fixed TestStepConcurrentPtr

Implementation of nextInProgress was wrong.
2016-10-21 21:51:34 -07:00
Derek Parker
46803551b8 CI: add Go 1.7 to Travis (#649) 2016-10-04 20:06:09 +02:00
aarzilli
9cbe768836 proc: Renamed temp breakpoints to internal breakpoints 2016-09-30 08:35:29 +02:00
aarzilli
7c49d4968d proc: Implement Step using Continue
Instead of repeatedly calling StepInstruction set breakpoints to the
destination of CALL instructions (or on the CALL instructions
themselves for indirect CALLs), then call Continue.
Calls to unexported runtime functions are skipped.
Reduces the number of code paths managing inferior state from 3 to 2
(StepInstruction, Continue).

Fixes #561
2016-09-27 09:37:33 +02:00
aarzilli
8d58262020 proc: bugfix: Next and normal calls to deferred function
When a deferred function is called directly Next and StepOut should not
step into it.

Fixes #582
2016-09-27 09:37:26 +02:00
Alessandro Arzilli
fb8388ab2e proc/variables: missing return statement on error (#643)
Fixes #642
2016-09-25 08:28:22 -07:00
Alessandro Arzilli
5d78c04e62 dlv: bugfix: Allow quoting in build flags argument (#639)
Allows quoted substrings in build-flags flag. This fixes a build
problem on windows where the default build flags must contain a space.

Fixes #634 and #638
2016-09-25 08:26:59 -07:00
Alex Brainman
4d8daeb1a8 proc: implement detach on windows (#615) 2016-09-12 11:16:41 -07:00
Koichi Shiraishi
2fad5abe74 cmd: Support space separate flags for build-flags (#619)
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2016-09-12 11:13:21 -07:00
Alessandro Arzilli
e4c7df1469 Fix prologue detection on testvariables2.go's main.main (#625) 2016-09-06 10:27:07 -07:00
Alessandro Arzilli
f2c1789c64 Changed TestIssue426 to work with go 1.8 (#627)
go1.8 changed the way anonymous struct names are generated for DWARF.
2016-09-06 10:26:56 -07:00
Alessandro Arzilli
a782abee90 Update vendored version of peterh/liner (#620)
As suggested by Ederson de Souza.
https://groups.google.com/forum/?utm_medium=email#!msg/delve-dev/W_SfC3i9tf0/MY4QWaZOCgAJ
2016-09-01 08:29:46 -07:00
Alex Brainman
f09ef23f9e proc: implement attach on windows
Updates #363
2016-08-12 12:30:01 +10:00
guo
c3ade94b86 proc: fix could not read process comm name error
fix #531
2016-08-05 13:14:46 +08:00
dr2chase
218c2b953b proc: Fix stepping into runtime.duff* (#575)
Detect calls that do not target a function's entrypoint
(i.e, calls to runtime.duffzero and runtime.duffcopy) and
instead step into them directly.  StepInto sets a breakpoint
past the called function's prologue and expects that continue
will hit that breakpoint, but because the call is into the
interior of the function (well past the prologue) this fails.

Fixes #573
2016-07-21 13:10:35 -07:00
Alessandro Arzilli
16f16cf86d proc: bugfix: cleaning up spurious process exited errors (#599)
Fixes flakiness of TestCmdLineArgs.
2016-07-20 15:36:31 -07:00
aarzilli
c7f11149d7 Fix typo in terminal/terminal.go
Fixes #589
2016-07-08 15:10:13 +02:00
Nan Xiao
bfc280f48f Fix typo in proc/arch.go. 2016-07-08 13:57:40 +08:00
Alessandro Arzilli
142d882799 debugger/locations: Fixed bug parsing remote package paths (#586) 2016-07-05 12:13:21 -07:00
Alessandro Arzilli
372869c9e1 proc: Back to using vendored golang.org/x/debug/ (#585)
Patch https://go-review.googlesource.com/23085 has been merged so we
can go back to using golang.org/x/debug/.
2016-07-05 11:58:11 -07:00
aarzilli
da910cc3bd proc: disabled TestUnsupportedArch on go1.7
See: https://github.com/golang/go/issues/16180
2016-07-03 09:02:21 +02:00
aarzilli
80336e57e0 Replaced net/rpc with custom version
This version preserves the order of requests, allows the
client to switch between API versions and introduces a
way to send notifications to the client (see TODO item at:
proc/proc_linux.go:325).

Fixes #523, #571
2016-07-02 12:16:06 +02:00
aarzilli
51c39ed171 proc: detect when Launching non-executable files
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
2016-06-30 09:39:18 +02:00
aarzilli
5714aa548c proc: cleanup: attach FDE to Stackframe structure 2016-06-24 21:22:30 +02:00
aarzilli
9d70adf5c9 proc: Removed setChanRecvBreakpoints
This function was broken for a very long time until the changes in this
PR fixed it. However I do not think it is desirable to be catapulted
into some other goroutine by 'next' just because that other goroutine
happened to receive a message on a channel.

This feature should be implemented by a new command, not next.
2016-06-24 21:22:30 +02:00
aarzilli
80952e14d4 proc, terminal: step-instruction on parked goroutines 2016-06-24 21:22:30 +02:00
aarzilli
6faa78ff7c proc, terminal: step on parked goroutines
Previously Step would step through the goroutine associated with
CurrentThread if SelectedGoroutine was parked
2016-06-24 21:22:30 +02:00
aarzilli
d17c7c3a61 proc, terminal: next on parked goroutines
Previously Next would step through the goroutine associated with
CurrentThread if SelectedGoroutine was parked

Also fixes a bug with proc.(*Process).StepInto where StepInto could
switch to a different goroutine.
2016-06-24 21:22:30 +02:00
aarzilli
323c0450d1 tests: fixed version check for go1.7 to include beta versions 2016-06-22 12:38:40 +02:00
Alessandro Arzilli
7761faad5b terminal: show current thread of goroutines (#564) 2016-06-20 10:20:44 -07:00
David Benque
ede880134c Add support for Appengine; parsing Appengine Go custom version (#566) 2016-06-07 11:07:37 -07:00
Derek Parker
a620c04f8d all: go fmt things 2016-05-29 22:13:52 +02:00
Derek Parker
0fded288b5 all: Fix typos 2016-05-29 22:13:52 +02:00
Alessandro Arzilli
9bc6ad4f46 Go 1.7 compatibility (#524)
* 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.
2016-05-29 12:20:09 -07:00
Alessandro Arzilli
5933a0f48f proc: bugfix: unsigned integer overflow in proc.(*memCache).contains (#555)
Fixes #554
2016-05-29 12:11:00 -07:00
Nan Xiao
fa1db367fe Docs: Update Documentation/cli/README.md. (#549)
* Docs: Update Documentation/cli/README.md.
2016-05-29 11:59:46 -07:00
Nan Xiao
7f6d7e214d dlv/cmds: Add missing periods in help output. (#547) 2016-05-25 12:13:16 -07:00
Derek Parker
93d82ca8d2 dlv/cmds: Improve subcommand help output 2016-05-20 20:32:16 +02:00
Derek Parker
58738c969e Documentation: Add homebrew install 2016-05-20 20:31:30 +02:00
Derek Parker
62f8e2b5ad terminal: Display commands in alphabetical order 2016-05-20 10:33:08 -07:00
Nan Xiao
709e308339 terminal: Display subcommads in alphabetic order. (#539)
For better user experience, display subcommands in alphaetic order.
2016-05-20 10:22:10 -07:00
aarzilli
fd16999702 documentation: Add known bugs. 2016-05-18 09:13:21 +02:00
aarzilli
a1ac17f16c service/test: Added test for issue #528
This issue is fixed by go 1.7, the test will only run on newer versions
of the compiler.
2016-05-18 09:07:19 +02:00
Gert Cuykens
60eabf045b docs: Update install.md (#536) 2016-05-17 16:41:22 -07:00
Nan Xiao
6661848cac dwarf: Fix typo in dwarf/util/util.go (#530)
Fix typo.
2016-05-17 16:36:41 -07:00
Alex Brainman
8b4abf5998 docs: Do not mention MinGW during Windows installation 2016-05-16 12:45:23 +10:00
Nan Xiao
b9b3e4ac03 proc: Update stack.go (#527)
Fix typo.
2016-05-13 11:28:56 -07:00