Commit Graph

1271 Commits

Author SHA1 Message Date
visualfc
f7e403abcf dlv: Headless mode print listener address info (#487)
* Headless mode print listener address info

* if Headless && Addr == localhost:0 print address

* update listen flag changed check

* terminal: headless print API server listening address
2016-04-24 10:27:02 -07:00
Evan Lin
7b7387fd1e makefile: Check $GOBIN before codesign, otherwise use $GOPATH/bin (#504)
Fixes #502
2016-04-24 10:26:12 -07:00
Alessandro Arzilli
f7cb6053d2 documentation: API documentation improvements (#507)
* documentation: headless invocation should specify --api-version=2

* documentation: More API documentation

* documentation: copied documentation from client.go to rpc2/server.go

Fixes #164
2016-04-24 10:18:02 -07:00
Alessandro Arzilli
473b66387c proc: Improvements to Variable printing (#444)
* service/api: Removed unused fields of service/api.Function

* proc/eval: Set return variable name to input expression

* all: fine-grained control of loadValue for better variable printing

Makes proc.(*Variable).loadValue loading parameters configurable
through one extra argument of type LoadConfig.
This interface is also exposed through the API so clients can control
how much of a variable delve should read.
2016-04-24 10:15:39 -07:00
Matias Lahti
60946a759c proc: Fix command-line arguments on Windows (#501)
* proc: add tests for command-line arguments

adds tests to make sure command-line arguments are passed to Launch() properly

* proc_windows: pass command-line arguments to CreateProcess()

build command-line arguments according to how the standard library does it and pass the command line along to the actual syscall on Windows.

see discussion in #479

* proc: better testing of cmd-line arguments

* proc_windows: fix a possible error-case with passing just 1 argument

previously, the command line pointer passed to sys.CreateProcess was empty, if we had 0 parameters (len(cmd) == 1, as cmd[0] is the executable, so no cmdlineGo would be created, while with any argument it would as len(cmd) > 1). This might cause problems down the road, so make sure we include the command line every time, even if it seems to work without.

* proc: improve testing of command-line arguments

test that arguments with spaces are passed on correctly and DRY failure/success condition checking in the args test
2016-04-21 14:20:38 -07:00
aarzilli
e8cb04303a command: fixed documentation for frame.
Issue #510
2016-04-21 11:27:13 +02:00
Derek Parker
f454207a34 terminal: Update doc strings for getColorableWriter 2016-04-18 12:49:14 -07:00
Yasuhiro Matsumoto
f6836cbcf1 terminal: Use go-colorable
Add fallback to display colors on Windows.
2016-04-18 12:49:14 -07:00
Alessandro Arzilli
af4798e2a9 service,terminal: APIv2 plus method to select API version (#460)
New API version with better backwards compatibility plus mechanism to
select the API version that a headless instance should use.

Adds service/test/cmd/typecheckrpc.go to type check the RPC interface.
2016-04-18 12:20:20 -07:00
Derek Parker
f37a26d525 proc: Use correct type for mach task 2016-04-12 22:53:13 -07:00
Derek Parker
4fd02c829a proc: Set close-on-exec flag on fork pipes 2016-04-12 22:33:20 -07:00
Sam Zaydel
26ce16f1db docs: Changed word from singular to plural form to better fit context. (#491) 2016-04-08 14:12:38 -07:00
Alessandro Arzilli
43c27a40cb Documentation: List of editor plugins (#490) 2016-04-07 09:06:21 -07:00
Wesley Merkel
e60942a39d terminal: show message if there are no vars/locals/args
When the vars, locals, or args commands return no results, nothing is

printed out to the terminal. This commit makes these commands print a

message like `(no locals)` when there is nothing to show. This feedback

is more descriptive of what is being returned than an empty string.
2016-04-06 09:26:10 -07:00
Derek Parker
ae7abe1a9d vendor: Remove localtests packages from godeps 2016-04-06 09:39:34 +02:00
Harry Moreno
a20bdf4b3b docs: Make installation directory more explicit 2016-04-04 10:39:40 -07:00
Sam Vilain
cfe0e52d04 Instruct OSX users to trust certificate, not key
I ran through these instructions and didn't notice that the
certificate I'd created appeared three times in the list I
was looking at.  Emphasize where the trust setting is
enabled.
2016-03-30 11:50:27 -07:00
aarzilli
53af850bdc proc: Never return a stack trace of zero frames
proc.(*Thread).Scope fails if we can find a FDE but PCToLine returns
nothing
2016-03-28 09:01:16 -07:00
aarzilli
0f4b7ce8c7 proc: add runtime.mcall to top of stack function 2016-03-28 09:01:16 -07:00
aarzilli
497b526194 proc: stacktrace refactoring
- 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
2016-03-28 09:01:16 -07:00
aarzilli
43756cd864 proc: bugfix: Truncate stacktrace when FDE of a frame can not be found
Instead of returning an error when FDE of a frame can not be found,
just truncate the stack trace.

Fixes #462
2016-03-28 09:01:16 -07:00
aarzilli
59beb7b442 debugger: Allow disassembly even if the scope can not be converted
It is sometimes impossible to convert an EvalScope immediately after
starting the program but disassembly can still proceed.
2016-03-28 08:44:18 -07:00
Steve Mynott
b1011b7378 terminal: create "h" alias for "help" command 2016-03-23 18:21:57 -07:00
aarzilli
d735d1824c proc: removed dead code from proc.(*Variable).parseG 2016-03-23 13:45:57 +01:00
Derek Parker
487215fd09 docs: Update OSX install docs
Fixes #403
2016-03-18 09:08:26 -07:00
Derek Parker
522e7aa266 misc: minor message format cleanup 2016-03-17 15:35:10 -07:00
Hubert Krauze
37f124817d dlv: Misc refactors 2016-03-17 15:32:30 -07:00
Alex Brainman
ff0ec8ce00 terminal: do not use escape codes on windows unless they are supported 2016-03-15 09:43:22 +01:00
Derek Parker
e88ea83e1d proc: TODO trace stop status on kernel versions 2016-03-14 09:43:55 -07:00
Derek Parker
82e3939cf9 proc: whitespace/import cleanup 2016-03-14 09:40:24 -07:00
Joe Grasse
59ef8a7a71 proc: Add process state T
On linux kernel 2.6.x, the Trace/Stop status is 'T'

Fixes #209
2016-03-14 09:39:39 -07:00
vancouverwill
7d3d90a04d Updated OSX install.md
It was unclear that to install, first clone Delve before `CERT=mycert make install`
Added link to helpful walkthrough installation video
2016-03-14 08:55:48 +01:00
aarzilli
c4797ea445 proc: Breakpoint to catch unrecovered panics
Automatically sets a breakpoint on runtime.startpanic, the function
that gets called by runtime.dopanic when a panic is not recovered.

Implements #317
2016-03-09 14:15:30 +01:00
aarzilli
c66c6408a5 proc: Caching type offsets
Caches the mapping of type names to offset in debug_info to speed up
variable evaluation.

BEFORE:
	BenchmarkArray-4         	     100	  13'238'441 ns/op	   0.62 MB/s
	BenchmarkArrayPointer-4  	     200	  10'044'093 ns/op	   0.87 MB/s
	BenchmarkMap-4           	    1000	   1'332'530 ns/op	   0.77 MB/s
	BenchmarkGoroutinesInfo-4	      10	 114'677'462 ns/op
	BenchmarkLocalVariables-4	    2000	   1'223'975 ns/op
AFTER:
	BenchmarkArray-4         	     200	   9'925'686 ns/op	   0.83 MB/s
	BenchmarkArrayPointer-4  	     100	  11'143'930 ns/op	   0.78 MB/s
	BenchmarkMap-4           	    2000	   1'302'520 ns/op	   0.79 MB/s
	BenchmarkGoroutinesInfo-4	      30	  35'079'549 ns/op
	BenchmarkLocalVariables-4	    1000	   1'137'299 ns/op

Note in particular the speedup of BenchmarkGoroutinesInfo, since
proc.(*Variable).parseG is a function we call a lot.
2016-03-05 13:04:11 +01:00
Derek Parker
758f76ffee misc: Include issue template for GitHub 2016-03-03 10:40:14 -08:00
John Aylward
5fe0d79e01 Fixes quote of certificate 2016-02-28 20:33:09 -05:00
aarzilli
49a0a121e0 tests: Add test for #149, fixed TestNextGeneral on tip
The go compiler changed and break statements no longer get compiled to
nothing when -N is passed:

https://go-review.googlesource.com/#/c/19848/
https://go-review.googlesource.com/#/c/19854/
2016-02-28 16:44:22 -08:00
Derek Parker
216616c34e terminal: misc cleanup 2016-02-28 16:42:48 -08:00
aarzilli
ecc95cd2ac debugger: bugfix: BreakpointInfo variables evaluated on wrong thread
BreakpointInfo variables were always evaluated on CurrentThread
instead of the thread that triggered the breakpoint.
2016-02-28 13:38:05 +01:00
aarzilli
5ba9bcd740 terminal: Mechanism to handle command prefixes
Implements extensible mechanism to specify which commands accept
prefixes (goroutine, frame, on) instead of hardcoding them in
a switch.

Implements #240
2016-02-28 13:38:05 +01:00
Derek Parker
b3c1ca5384 service/test: Improve TypesCommand filter assetion 2016-02-27 15:50:37 -08:00
aarzilli
c8f4cee97d New command 'types'
Lists all the types defined in the debugged program.
2016-02-27 15:39:11 -08:00
aarzilli
14a92352bc proc: Add filter for non-variable global symbols to PackageVariables 2016-02-27 15:26:24 -08:00
aarzilli
58913527db proc: Crash when stepping past the end of the program
Fixes #414
2016-02-27 15:15:51 -08:00
Derek Parker
16f30d0738 terminal: Refactor Term/FakeTerm 2016-02-27 15:02:55 -08:00
aarzilli
9e588fef72 terminal: Next does not fill BreakpointInfo
Fixes #411
2016-02-25 08:46:12 +01:00
Derek Parker
1efc4940cd service/debugger: Fix typo 2016-02-24 17:50:11 -08:00
aarzilli
82ef3cce78 debugger: bugfix: make delve API thread safe
proc.(*Process) methods are not thread safe, multiple clients
connecting simultaneously to a delve server (Issue #383) or a even
a single over-eager client (Issue #408) can easily crash it.
Additionally (Issue #419) calls to client.(*RPCClient).Halt can
crash the server because they can result in calling the function
debug/dwarf.(*Data).Type simultaneously in multiple threads which
will cause it to return incompletely parsed dwarf.Type values.

Fixes #408, #419 (partial)
2016-02-24 17:49:30 -08:00
aarzilli
037926015a proc: bugfix: propagate signals we don't handle to inferior
Fixes #419 (partial)
2016-02-24 17:49:30 -08:00
Derek Parker
63a660820e docs: Move wiki docs into Documentation dir
Going forward, all documentation should be placed in the Documentation
directory in the root of the project. This switch allows maintainers to
approve updates to documentation before they are committed, as opposed
to the pre-existing wiki which anybody could modify.

Currently the Documentation directory includes docs on building, usage,
and minimal docs around the API. This is just the initial commit, and
documentation will continue to improve over time.

Some changes have been made (and will continue to be made) to `cmd/dlv` to
ensure we can auto-generate documentation for all commands from the
newly provided script `scripts/gen-usage-docs.go`, which can be invoked
via `go run scripts/gen-usage-docs.go`.

Additionally, version has been split into its own package. This was a
bit of housekeeping related to the changes made the `cmd/dlv`.
2016-02-19 10:47:46 -08:00