Commit Graph

15 Commits

Author SHA1 Message Date
aarzilli
58913527db proc: Crash when stepping past the end of the program
Fixes #414
2016-02-27 15:15:51 -08:00
aarzilli
91743d9472 go fmt 2016-01-24 17:30:23 +01:00
Luke Hoban
bddb712a6b Add support for Windows.
Fixes #198.
2016-01-20 19:06:31 -08:00
Derek Parker
0188dc2c8b misc: cleanup and documentation 2016-01-10 02:10:51 -08:00
aarzilli
78c79927d6 proc: bugfix: [OS X] desync of mach message queue in Continue 2016-01-09 08:44:30 +01:00
aarzilli
b21686e6c4 proc: Continue does not work with breakpoints set on NOP (OSX)
Fixes #262
2016-01-09 08:44:28 +01:00
Derek Parker
38e0051308 thread.Halt: Remove duplication between OS implementations
Bring similar code up to top level, and keep OS dependant code in OS
dependant files. DRY up code a bit.
2015-08-20 10:06:33 -05:00
Derek Parker
b9846c7684 command (next): Improvements for parallel programs
This patch aims to improve how Delve tracks the current goroutine,
especially in very highly parallel programs. The main spirit of this
patch is to ensure that even in situations where the goroutine we care
about is not executing (common for len(g) > len(m)) we still end up back
on that goroutine as a result of executing the 'next' command.

We accomplish this by tracking our original goroutine id, and any time a
breakpoint is hit or a threads stops, we examine the stopped threads and
see if any are executing the goroutine we care about. If not, we set
'next' breakpoint for them again and continue them. This is done so that
one of those threads can eventually pick up the goroutine we care about
and begin executing it again.
2015-08-20 09:32:59 -05:00
Derek Parker
93dcd40cee Refactor read/write memory code 2015-08-01 21:43:03 -05:00
Derek Parker
0ab44d10ea Handle thread blocked on kevent 2015-07-14 09:51:52 -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
Giulio Iotti
256c83b17b Implement regs command to print registers values, fixes #62 2015-06-19 14:27:01 -05:00
Derek Parker
e4fc5e32c2 Refactor: Use thread-locked goroutine for ptrace ops
Previously either the terminal client or the debugger service would
either lock main goroutine to a thread or provide a locked goroutine to
run _all_ DebuggedProcess functions in. This is unnecessary because only
ptrace functions need to be run from the same thread that originated the
PT_ATTACH request.

Here we use a specific thread-locked goroutine to service any ptrace
request. That goroutine is also responsible for the initial spawning /
attaching of the process, since it must be responsible for the PT_ATTACH
request.
2015-06-13 12:57:42 -05:00
Derek Parker
e5233e7262 Rename: s/ThreadContext/Thread/ 2015-06-12 14:51:23 -05:00
Derek Parker
bfca6114d4 Rename package proctl -> proc 2015-06-12 14:49:23 -05:00