29 Commits

Author SHA1 Message Date
3a8730de72 proc: Do not panic when a command is executed on an exited process
Fixes #355
2016-01-30 07:23:21 +01:00
fb7210934d service/rpc: clean irrelevant net/rpc error messages
Fixes #378
2016-01-29 17:27:42 +01:00
70cbbdc083 service/locations: hooked expression evaluator to location specifiers
Location specifiers starting with '*' can be followed by any
expression supported by the evaluator.
The expression should evaluate to either an integer (which will be
interpreted as an address) or to a function pointer (which will be
dereferenced to get the function's entry point).
2016-01-17 21:45:28 -08:00
708cf2f290 service,terminal: propagating simultaneous breakpoints 2016-01-09 08:44:25 +01:00
b5cf1572f8 service/debugger: support function spec. with partial package paths
packagename.SomeFunction should match
github.com/someuser/packagename.SomeFunction since the former is
the familiar syntax.
To disambiguate between io.SomeFunction and
github.com/someuser/somepackage/io.SomeFunction specify one extra
slash at the start of the location specifier: /io.SomeFunction.

Fixes Issue #296
2015-12-12 15:01:41 +01:00
50b5fc92e2 Changed api.Variable to have a machine readable value
The new contents of api.Variable are documented in
proc/variables.go.

Implements #243
2015-10-28 18:28:58 -07:00
28e0a322bf proc: Improve 'next' functionality
Instead of trying to be clever and make an 'educated guess' as to where
the flow of control may go next, simple do the more naive, yet correct,
approach of setting a breakpoint everywhere we can in the function and
seeing where we end up. On top of this we were already setting a
breakpoint at the return address and deferred functions, so that remains
the same.

This removes a lot of gnarly, hard to maintain code and takes all the
guesswork out of this command.

Fixes #281
2015-10-22 10:14:24 -07:00
971d7968c0 service/debugger: Bugfix: support pkg names with slashes in linespecs
Fixes #275
2015-10-17 09:31:07 +02:00
d8dd9c8d0e proc: Properly close channels upon process exit
Prevents a lot of goroutines hanging around, especially when running
tests.
2015-10-09 17:33:16 -07:00
c6b5609f77 all: Run go fmt across all files 2015-10-04 10:58:32 -07:00
c9b517067b Implements set command for pointers and numerical values
set <variable name> <value>
2015-09-28 22:45:06 -07:00
bba999b985 proc: bugfix: intermittent failures of TestRestart_afterExit
During process termination we seem to receive notifications of new
threads that die before we can add them, ignore them
2015-09-27 07:56:47 +02:00
da39258bec stack command: -full flag prints local variables and arguments of all the functions on the stack trace 2015-09-18 08:34:21 +02:00
017ce2ae4e Fix: absolute path confused for regexp in FindLocation 2015-09-09 10:06:56 -05:00
c6ebd80905 Variable evaluation on arbitrary (goroutine, frame) pair. 2015-09-05 12:08:40 -05:00
fd08e96b24 Fix: rpc.(*RPCClient).EvalVariableFor
Original implementation was passing the wrong argument.
2015-08-09 20:37:11 -05:00
8e8d2660ef Improve commands which take a location spec
Breakpoints, tracepoints, etc.. take a location spec as input. This
patch improves the expressiveness of that API. It allows:

* Breakpoint at line
* Breakpoint at function (handling package / receiver smoothing)
* Breakpoint at address
* Breakpoint at file:line
* Setting breakpoint based off regexp
2015-08-08 14:41:48 -05:00
d06abe3f2f Debugger.Restart: Preserve breakpoints
Fixes #188
2015-08-02 00:08:48 -05:00
a0115e3a15 bugfix: Issue #170 (partial) set function breakpoints on the first instruction
the entry point of a function is the beginning of the prologue, which can be run multiple times for each invocation of a function if the stack needs to be expanded or the scheduler needs to be run.
2015-07-28 08:16:20 -05:00
a353735715 Breakpoints are hit multiple times or skipped sometimes (tests) 2015-07-28 08:13:46 -05:00
2f7612d4af Add command to restart process
Fixes #95
2015-07-03 15:35:22 -05:00
d2b8d57053 Return exit status with DebuggerState 2015-07-03 15:28:46 -05:00
6b99c5f519 Cleanup tracepoint commit
* Cleanup comments
* Cleanup naming in certain instances
* Modify stacktrace to return current location
2015-06-30 22:16:52 -05:00
3a96d8eed7 trace command 2015-06-29 21:16:55 +02:00
29ed169848 Return error when invoking Delve with invalid path
Fixes #154
2015-06-26 23:05:15 -05:00
72b81c0c6b Ensure process is stopped before detaching in tests 2015-06-24 18:33:38 -05:00
7c8fd02685 Remove HTTP server/client in favor of JSON-RPC
Instead of maintaining two separate client / server implementations,
maintain only the more lightweight JSON-RPC service. The reasoning
behind the merging of the original HTTP service was ease of tooling, in
other words low barrier of entry for external clients (editor
integrations, etc...).

I believe the JSON-RPC solution still satisfies that constraint while
have the advantage of being a more lightweight solution. HTTP, while
highly supported in most modern languages, carries with it too many
features we would never take advantage of. The RPC architecture seems
a more natural approach.

The infrastructure set up during the initial HTTP service implementation
was leveraged in the JSON-RPC implementation, so if any of those
original authors are reading this commit message: thank you for that
work, it was not in vain even if though the original HTTP service is not
being removed.
2015-06-24 08:08:48 -05:00
48bb398c4b Properly report process exits 2015-06-21 21:11:47 -05:00
687dc4172d Introduce JSON-RPC service 2015-06-21 21:11:30 -05:00