Commit Graph

21 Commits

Author SHA1 Message Date
Luke Hoban
bddb712a6b Add support for Windows.
Fixes #198.
2016-01-20 19:06:31 -08:00
Derek Parker
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
omie
d5e00a583d dwarf/line: Support for parsing multiple file tables
Support multiple file / directory tables for multiple compilation units.

- added a type DebugLines that can hold number of DebugLineInfo
- added a supporting attribute to DebugLineInfo called 'Lookup' which is to be
used to quickly lookup if file exists in FileNames slice
- added supporting methods to lookup and return corresponding DebugLineInfo
- changed the debug_line parsing behavior to read all the available tables and
push them to DebugLines

- since Process.lineInfo is now a slice, it was breaking AllPCsBetween as well
- updated that function's definition to accept a new filename parameter to be
able to extract related DebugLineInfo
- updated calls to AllPCsBetween

- fixed tests that were broken due to attribute type change in Process
- updated _fixtures/cgotest program to include stdio.h, so that it updates
.debug_line header
- added a test to check 'next' in a cgo binary
- OSX - 1.4 does not support cgo, handle that in new testcase
2015-08-29 14:51:27 -05:00
Derek Parker
48d0703b4f Improve 'next' impl for non-go next'ing 2015-04-20 13:03:22 -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
6b80a726af Remove DWARF .debug_line parser / util funcs 2014-10-15 08:31:01 -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
f8a65c41c5 Improve next impl -- needs refactoring 2014-10-04 00:52:40 -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
9c298036b9 Rebuild binaries for every test 2014-09-12 15:19:36 -05:00
Derek Parker
232d3d7446 Prefer "new" for initialization 2014-09-01 10:39:04 -05:00
Derek Parker
9b415c7546 Remove test binaries 2014-08-27 17:56:23 -05:00
Derek Parker
950556ea49 Fix typo in error message 2014-08-05 19:02:44 -05:00
Derek Parker
319f6d2e20 Remove dwarf hack because Go fixed bug 2014-08-01 16:34:27 -05:00
Derek Parker
cba9ac206d Enable next to clean up after itself 2014-07-21 18:20:16 -05:00
Derek Parker
6b64296bca Improve .debug_line parser performance 2014-07-14 21:41:15 -05:00
Derek Parker
07fec48272 Further improve next command
* Fixes incorrect loop `next`ing behaviour
* Includes fix for determining return address
2014-07-11 14:52:55 -05:00
Derek Parker
3566fd5237 Improve next implementation
Improvements:
* `next`ing through a loop works correctly (when not already within a loop)
* `next`ing out of a function works correctly

Needs work:
* `next`ing in a loop can be improved when starting within a loop
2014-07-10 18:07:39 -05:00
Derek Parker
a788e03c7b Implement initial next implementation
This current implementation does not cover the following:

* Setting correct breakpoint when exiting loop
* Setting correct breakpoint when returning from function
    * All facilities are available for this, it just is not taken into
      account in the current `next` implementation.
2014-07-07 08:26:36 -05:00