Commit Graph

1300 Commits

Author SHA1 Message Date
Derek Parker
d8418c6506 Update README 2015-07-10 15:54:56 -05:00
Derek Parker
8107955039 Remove accidental GOMAXPROCS call in proc 2015-07-10 15:52:49 -05:00
Derek Parker
1ce255ffa3 Remove any printing from core proc package
Also, reorganizes some code.

Initially, the `proc` package emitted a lot of output. Now, that should
not be the case. The `proc` package should never print, for any reason.
That should be handled by clients.
2015-07-10 15:48:51 -05:00
Derek Parker
c8e4fcc285 Upper case comment 2015-07-10 15:43:42 -05:00
Derek Parker
b31575b54c Refactor: condense code for looking at current fn 2015-07-10 15:42:09 -05:00
Derek Parker
53fc891157 Update README formatting 2015-07-10 15:16:44 -05:00
Derek Parker
38e2cfc615 Remove duplicate call to Halt 2015-07-10 15:15:44 -05:00
Derek Parker
99cf3abc18 Inline superfluous function definition 2015-07-10 14:48:45 -05:00
Derek Parker
aa71d787aa Always stop the world after trapWait in resume
We do not need to verify a current breakpoint, nor do a redundant check
on whether we have been asked to manually halt. Assume trapWait has done
its due diligence and stop the world once it returns.
2015-07-09 23:13:20 -05:00
Derek Parker
587a758afa Update README / CONTRIBUTING docs with mailing list link 2015-07-09 18:50:45 -05:00
Derek Parker
a00957fcf5 Reuse existing function for BP by ID lookup
Also, kill whitespace to make code appear more as a singular block for
readability.
2015-07-09 15:45:43 -05:00
Derek Parker
386101466a Update comment in next 2015-07-09 15:21:10 -05:00
Derek Parker
a99a37f397 Initial refactor of source package
Major source cleanup, still not finished. Removes gross control flow.
2015-07-09 13:06:30 -05:00
Derek Parker
4aad37b69c Reorder imports 2015-07-08 15:02:43 -05:00
Derek Parker
c496e9bccf Don't rely on CurrentBreakpoint, lookup before continue 2015-07-08 13:06:06 -05:00
Derek Parker
8c44181d56 Prefer actual thread location in goroutine struct 2015-07-07 21:21:47 -05:00
Derek Parker
4d1dc5ad0e Inject SIGTRAP for manual stop
Instead of fighting against the normal flow, just signal a SIGTRAP and
let the existing flow handle it, as long as we set the halt flag
correctly the system should halt.
2015-07-07 15:55:22 -05:00
Derek Parker
8b68ae0bf5 Cleanup conditional 2015-07-07 14:58:01 -05:00
Derek Parker
776e2a593f Null terminate argv array in Go land not C land 2015-07-07 14:57:36 -05:00
Derek Parker
c1e7f8c45a Do not ask to kill process we spawned 2015-07-07 09:04:03 -05:00
Derek Parker
05517c62c1 Properly terminate C string array for execve on OSX 2015-07-07 08:42:34 -05:00
aarzilli
5a35e8e6ff Fix: Bug in StackTrace RPC plumbing 2015-07-04 08:05:37 -05:00
Derek Parker
2f7612d4af Add command to restart process
Fixes #95
2015-07-03 15:35:22 -05:00
Derek Parker
d2b8d57053 Return exit status with DebuggerState 2015-07-03 15:28:46 -05:00
Derek Parker
dcfa1aea2b Properly return ProcessExitedError upon process death 2015-07-01 21:36:13 -05:00
Derek Parker
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
aarzilli
3a96d8eed7 trace command 2015-06-29 21:16:55 +02:00
Derek Parker
c267eda9ba Update docs for ClearBreakpoint 2015-06-29 08:06:48 -05:00
aarzilli
2fcbc4bdef ClearBreakpoint should clear a hardware breakpoint from all threads
additionally fixes a bug when Detach is called on an exiting/exited thread: dbp.CurrentThread could point to a thread that has already been removed from dbp.Threads by trapWait which will lead to a nil pointer dereference caused proc.Process.clearBreakpoint getting nil from dbp.Threads[tid]
2015-06-29 11:35:53 +02:00
Derek Parker
70aff5612c Check thread.CurrentBreakpoint instead of PC lookup 2015-06-27 23:22:02 -05:00
Derek Parker
8d4a73f7dd Refactor: Reorganize guard clauses 2015-06-27 23:22:01 -05:00
aarzilli
358fb75fc6 Return helpful error when attaching to a process is impossible 2015-06-27 23:21:26 -05:00
Derek Parker
29ed169848 Return error when invoking Delve with invalid path
Fixes #154
2015-06-26 23:05:15 -05:00
Derek Parker
24c024d1e6 Kill whitespace 2015-06-26 22:10:09 -05:00
aarzilli
d919114d32 Fix: Linux - call wait4 on thread grp leader is broken
On a thread that's leader of its group,
that is ptraced and that was survived by its children.
2015-06-26 22:10:09 -05:00
aarzilli
71fae8f5c6 Only clear and reset breakpoint for current thread 2015-06-26 22:03:50 -05:00
Derek Parker
9d1711d376 dbp.Running determined by any thread running 2015-06-26 09:58:26 -05:00
Derek Parker
db278d0453 Improve TestHalt reliability on Linux 2015-06-26 07:46:46 -05:00
Derek Parker
4f6c0de11f Pad single digit line numbers in output 2015-06-26 07:32:11 -05:00
Derek Parker
4d8f5659ac Fix source file context formatting 2015-06-25 07:46:02 -05:00
Derek Parker
5c29417348 Update gitignore -- ignore vagrant dir 2015-06-24 18:35:40 -05:00
Derek Parker
72b81c0c6b Ensure process is stopped before detaching in tests 2015-06-24 18:33:38 -05:00
Derek Parker
b35a743a3c Ensure thread is stopped before setting breakpoint
For hardware breakpoints we have to set them on every thread. It could
be the case that another thread is running. Stop it first, set the
breakpoint, then continue it.
2015-06-24 18:33:38 -05:00
Derek Parker
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
Derek Parker
6817bfc2ba Update CONTRIBUTING doc 2015-06-21 22:06:12 -05:00
Derek Parker
3899fc0b6c Relocate gitter badge 2015-06-21 21:59:10 -05:00
The Gitter Badger
db489355f1 Added Gitter badge 2015-06-22 02:38:33 +00:00
Michael Gehring
014e20d8a6 proc: don't deref nil pointer if getG fails 2015-06-21 21:11:48 -05:00
Derek Parker
b5483aa9cb Set GOMAXPROCS in proc_test
Makes for more deterministic test runs.
2015-06-21 21:11:48 -05:00
Derek Parker
48bb398c4b Properly report process exits 2015-06-21 21:11:47 -05:00