Commit Graph

83 Commits

Author SHA1 Message Date
aarzilli
d0f3459efb bugfix, Issue #163: offset of g struct in TLS picked based on the value of runtime.buildVersion and presence of compile units created by GNU AS, instead of being fixed to -16 2015-07-28 07:33:51 +02:00
Derek Parker
3cee10d8bc Implement 'trace' subcommand
Allows a user to execute `dlv trace [regexp]` and Delve will execute the
program and output information on functions matching [regexp].
2015-07-12 15:20:12 -05:00
Derek Parker
4a70f6af45 Update AddrForMember documentation. 2015-06-17 20:41:24 -05:00
Derek Parker
62f721ac54 Un-export that which need not be exported 2015-06-13 14:13:26 -05:00
Derek Parker
39945498a8 Improve 'next': return into deferred func 2015-05-09 12:44:38 -05:00
Derek Parker
2cfbc2937f Refactor: replace dwarf.Reader with wrapped reader 2015-05-09 11:25:26 -05:00
Derek Parker
544f20992f Refactor parseG function 2015-05-09 10:37:16 -05:00
Derek Parker
5a408e7054 Handle NULL addrs / empty OP stacks 2015-05-07 16:55:06 -05:00
Derek Parker
794d5b1e19 Revert errors.New change 2015-05-04 17:31:13 -05:00
Derek Parker
1ad66660a1 Prefer errors.New for unformatted errors 2015-05-01 16:27:29 -05:00
Derek Parker
109e5ab109 Copy instructions for FDE 2015-04-23 09:16:44 -05:00
Derek Parker
48d0703b4f Improve 'next' impl for non-go next'ing 2015-04-20 13:03:22 -05:00
Derek Parker
58db8322ef Improve chan / goroutine coordination
* Properly find next source line for goroutines blocked in chanrecv
* Refactor breakpoint clearing
* Refactor temp breakpoint setting
2015-04-19 17:15:34 -05:00
Derek Parker
92e0cb9f8b Rename method for clarity 2015-04-15 14:09:05 -05:00
Derek Parker
8ebab600f0 Copy InitialInstructions to prevent mutation 2015-04-15 14:08:18 -05:00
Derek Parker
86e1530524 Improve next implementation
* Better tracking of current goroutine
* More efficient, eliminates superfluous step syscalls
* Handles concurrency and thread coordination better
2015-03-31 17:12:45 -05:00
Derek Parker
464a6b96fe Fix FDE lookup at function entry
Also, rearrange and cleanup file a bit.

Fixes #72
2015-03-02 19:10:55 -06:00
Derek Parker
d4d8f1ce58 Update documentation 2015-03-02 18:06:04 -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
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
46b5348455 Comment cleanup. Added info vars reference to docs 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
76076791b9 Fix stack frame calculation bug
There were certain instances where the calculation of the stack frame
was incorrect, causing for garbage to be returned by a print command.
2015-01-16 15:30:22 -06:00
epipho
2c5527c6c9 Refactor member variable evaluation so it works in all cases 2014-12-31 16:20:26 -05:00
epipho
ed6d4049b6 Extracting common dwarf reader functionality into its own area 2014-12-31 11:46:58 -06:00
Derek Parker
e0738c417c Remove helper file & further isolate linux code 2014-12-09 10:51:17 -06:00
Derek Parker
e299dfde08 Isolate linux specific register getters / setters 2014-12-08 17:54:34 -06:00
Derek Parker
13a3112b6b Improve Go 1.4 support / cleanup goroutine printing 2014-11-25 20:37:43 -06:00
Derek Parker
3b2b17938b Improve support for goroutine context switching
Remove any assumption that a wait syscall on a thread id after a
continue will return. Any time we continue a thread, wait for activity
from any thread, because the scheduler may well have switched contexts
on us due to syscall entrace, channel op, etc...

There are several more things to be done here including:

* Potential tracking of goroutine id as we jump around to thread
  contexts.
* Potential of selectively choosing threads to operate on based on the
  internal M data structures, ensuring that our M has an active G.

This commit partially fixes #23 and #24, however there are still some
random hangs that happen and need to be ironed out.
2014-11-24 17:57:52 -06:00
Derek Parker
5722de6d2b Improve Dwarf frame establishing function
Remove reliance on order of dwarf instructions.
2014-11-24 07:53:39 -06:00
Derek Parker
7d69c16512 Add command to print all goroutines info 2014-11-09 12:56:21 -06:00
Derek Parker
5331dad93d Rename project 2014-10-15 09:28:22 -05:00
Derek Parker
6b80a726af Remove DWARF .debug_line parser / util funcs 2014-10-15 08:31:01 -05:00
Derek Parker
fa0092ac74 Rename helper dir 2014-10-14 09:53:10 -05:00
Derek Parker
58c1f54578 Improve Next implementation
Fix bug involving detecting whether or not we have stepped into another
function when we plan on return from the function we are currently in.
2014-10-13 19:04:38 -05:00
Derek Parker
dc8c9cc2a4 Optimize Next implementation
Once the program detects that we have stepped into another function,
we simply calculate the return address and then set a breakpoint and
continue to that location, avoiding numerous syscalls.
2014-10-13 08:24:59 -05:00
Derek Parker
c60f3aafde Refactor: Remove addrrange type 2014-10-11 01:05:27 -05:00
Derek Parker
09e352bdf7 Refactor: Move Cover method to FDE 2014-10-11 00:52:05 -05:00
Derek Parker
24b4c42ed9 cleanup failure message 2014-10-10 15:53:30 -05:00
Derek Parker
5d62780ec3 cleanup file names 2014-10-10 15:49:20 -05:00
Derek Parker
5da86a3e31 cleanup 2014-10-09 17:15:10 -05:00
Derek Parker
6a71009954 Fix Next impl
Needs some refactoring and some optimization, but fixes several bugs.
2014-10-09 14:19:10 -05:00
Derek Parker
c9cbaea291 Optimize Next implementation
Now that I'm using the step strategy, I put in an optimization where if
stepping into another function, simply find the return address, put a
breakpoint there, and then continue.
2014-10-07 13:57:03 -05:00
Derek Parker
f8a65c41c5 Improve next impl -- needs refactoring 2014-10-04 00:52:40 -05:00
Derek Parker
04c5f785f9 Remove unused test helper funcs 2014-09-19 16:44:20 -05:00
Derek Parker
eae4e99f78 Cleanup dwarf/frame tests 2014-09-18 23:00:41 -05:00
Derek Parker
8ee9525f47 Ensure temp breakpoints are cleared after next 2014-09-18 22:28:21 -05:00
Derek Parker
f1e5a70a4b Update for Go 1.3.1
I decided to vendor all debug/dwarf and debug/elf files so that the
project can be go get-table. All changes that I am waiting to land in Go
1.4 are now captured in /vendor/debug/*.
2014-09-13 12:28:46 -05:00
Derek Parker
6ae71169ed Update return address offset finder for laster go version 2014-09-12 15:59:29 -05:00