Derek Parker
e616b7fab6
Stop debugged proc on ctrl-c (OS X)
2015-03-13 15:13:41 -05:00
Derek Parker
4729ae828b
Allow arbitrary switching between threads
2015-03-13 14:50:01 -05:00
Derek Parker
9f70f43f5c
Update thread printing, now denotes current thread
...
Also refactored code a bit, removed printing functions from proctl
package and inlined them into command.
2015-03-11 18:08:20 -05:00
Derek Parker
11405314d8
Continue thread properly taking into account suspend_count
2015-03-07 18:27:03 -06:00
Derek Parker
0660fcc09b
Reap child process for status (OS X)
2015-03-06 17:28:53 -06:00
Ivar Gaitan
8b04d877a0
Handle process natural death a bit better
2015-03-06 17:03:08 -06:00
Derek Parker
f39e134d1d
Improve error for HW breakpoint
2015-03-06 08:53:55 -06:00
Derek Parker
0b3cf1cd15
Add command to print active breakpoints
2015-03-06 08:53:54 -06:00
Derek Parker
c4f90625f6
Fix linux build
2015-03-01 11:02:17 -05:00
Derek Parker
562a6fcca0
Fix mach kernal deallocations
2015-03-01 09:46:01 -06:00
Derek Parker
03b17821c8
Inline function
2015-02-28 22:10:39 -06:00
Derek Parker
ac914fe14a
Organize code a bit more
2015-02-28 22:08:42 -06:00
Derek Parker
2b76fee539
Inline function
2015-02-28 22:03:26 -06:00
Derek Parker
9f05f444eb
Cleanup TODOs
2015-02-28 21:53:26 -06:00
Derek Parker
c7cc84fa83
More cleanup
2015-02-28 21:34:55 -06:00
Derek Parker
0ba45f8487
Cleanup
2015-02-28 21:14:22 -06:00
Derek Parker
cd30ca6cb4
Remove defs file
2015-02-28 21:14:13 -06:00
Derek Parker
4d918aeb2c
Handle more kern return values and general cleanup
2015-02-28 10:44:36 -06:00
Derek Parker
b065674fe3
Handle set_pc errors
2015-02-28 10:41:05 -06:00
Derek Parker
636719a4c6
Handle thread_get_state errors
2015-02-28 10:39:21 -06:00
Derek Parker
77725b3d66
Cleanup kernel allocations
2015-02-28 10:35:44 -06:00
Derek Parker
f4ec73bb62
Fix hanging issue on Linux
2015-02-28 09:05:37 -05:00
Derek Parker
27f68abebd
Fix Linux panic
2015-02-27 22:35:26 -05:00
Derek Parker
450e5c4805
Fix linux compile errors
2015-02-27 17:13:35 -06:00
Derek Parker
35a0471fd6
Update more exc files for cond compilation
2015-02-27 15:32:47 -06:00
Derek Parker
fc4469b460
Rename exc files for conditional compilation
2015-02-27 15:31:07 -06:00
Derek Parker
7f52928c03
Cleanup of printing and putsing
2015-02-27 15:27:48 -06:00
Derek Parker
2d2d70641e
(Mostly) working on OS X
2015-02-27 15:03:06 -06:00
Derek Parker
daf5030023
slight cleanup
2015-02-17 12:27:47 -05:00
Derek Parker
4d88d9ed8d
Prefer binary search over tree lookup for FDEs
...
FDEs previously were loaded into a red/black tree and searched. This is
significantly more expensive than a binary search over a slice. Not sure
what I was thinking using a red/black tree - this binary search
implementation is significantly more efficient.
2015-02-04 19:22:39 -06:00
epipho
6b843c18eb
Removed debugging printf
2015-02-04 13:15:10 -05:00
epipho
46b5348455
Comment cleanup. Added info vars reference to docs
2015-02-04 13:15:10 -05:00
epipho
c7fe4e3e88
Added limit to array size (64) and struct member recursion (2) when printing
2015-02-04 13:15:10 -05:00
epipho
fe8e85e341
Start of info vars
2015-02-04 13:15:10 -05:00
epipho
5231b06a6b
Added handler for unknown and void types. Handle nil fn pointers.
2015-02-04 13:15:09 -05:00
Derek Parker
aa8ad88965
Improve documentation
2015-02-02 16:09:56 -05:00
Derek Parker
e001bbfff2
Fix race between Delve and tracee runtime
...
This commit fixes a race condition between Delve and the runtime of the traced process. When a new thread is created in the traced process, Delve takes note of it and then continue both the new thread, and the thread that called clone. If Delve attempts to use data in `runtime.allm` before the new `m->procid` is set, errors occur. The errors are due to Delve assuming any m with a procid of 0 is the main thread of the process (due to how theGo runtime allocates M's, only `clone`d threads have procid properly set. This causes certain events (like `next`) to happen twice to the main thread, because 2 m's in `runtime.allm` have a `procid` of 0, and also causes various other issues that prevent proper thread coordination from Delve.
Fixes #43
2015-02-01 13:45:20 -05:00
Derek Parker
4f5bfc5ee8
Handle clearing HW breakpoints properly
2015-01-31 20:43:48 -06:00
Ellery D'Souza
d4097e3be9
Fixed missing header file "sys/types.h" to fix compiler error
2015-01-26 15:10:21 -06:00
Paul Sbarra
58de1f7c85
migrate to go.sys subrepository
...
As of go version 1.4 the standard library syscall package is "locked
down" and code outside of the standard library is recommended to migrate
to the go.sys subrepository.
Reference: https://golang.org/s/go1.4-syscall
2015-01-25 22:43:47 -06:00
Michael Gehring
0d08380555
Fix PtracePeekUser
2015-01-25 21:57:56 +01:00
Michael Gehring
2a66ecb10b
Some hw breakpoint fixes
...
Enable usage of dr1-dr3. Clear control bits when a breakpoint
is disabled. Use DR_LEN_1 instead of DR_LEN_8 so breakpoint work on
unaligned adresses.
Fixes #51 .
2015-01-24 11:10:42 +01:00
Derek Parker
ff789d1df6
Update error message for missing .debug_frame
2015-01-23 14:59:42 -06:00
epipho
d7e535f25b
Dont panic if .debug_frame section is not found. Log and exit
2015-01-23 14:57:31 -06:00
Ivar Gaitan
d9c3488f12
Report caller file:line in assert helper fn
2015-01-23 14:55:24 -06:00
Paul Nasrat
46e5cfd399
proctl: propagate underlying error for failing hardware breakpoint.
...
Improves error message on systems that delve is failing on.
2015-01-22 17:10:48 -05:00
epipho
1782e13f74
Genericized slice reading
2015-01-20 01:37:52 -05:00
epipho
e2236664dd
Genericized array reading
2015-01-20 00:32:08 -05:00
epipho
99b614a028
Adding support for reading function pointers and mapping them to function names
2015-01-19 23:15:40 -05:00
epipho
056df44318
Support for uint and boolean types
2015-01-19 22:18:17 -05:00