Commit Graph

26 Commits

Author SHA1 Message Date
aarzilli
da39258bec stack command: -full flag prints local variables and arguments of all the functions on the stack trace 2015-09-18 08:34:21 +02:00
aarzilli
c6ebd80905 Variable evaluation on arbitrary (goroutine, frame) pair. 2015-09-05 12:08:40 -05: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
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
aarzilli
0933a681cf proc.(*Thread).GetG: reading TLS memory directly for g address instead of modifying the executable code 2015-07-28 07:33:51 +02: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
aarzilli
3a96d8eed7 trace command 2015-06-29 21:16:55 +02:00
Derek Parker
70aff5612c Check thread.CurrentBreakpoint instead of PC lookup 2015-06-27 23:22:02 -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
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
Michael Gehring
014e20d8a6 proc: don't deref nil pointer if getG fails 2015-06-21 21:11:48 -05:00
Derek Parker
6e538119d2 Refactor: Rename breakpoint methods
s/Break/SetBreakpoint/
s/Clear/ClearBreakpoint/
s/BreakByLocation/SetBreakpointByLocation/
2015-06-20 18:01:06 -05:00
Derek Parker
102d4c89ae s/DebuggedProcess/Process/ 2015-06-20 17:54:52 -05:00
aarzilli
07473f04c5 Implement stack command
Finishes #63 #64
2015-06-20 15:29:33 -05:00
Derek Parker
b018c6bc31 Update thread.Continue documentation 2015-06-19 08:08:25 -05:00
Derek Parker
1201b3201d Remove unused thread methods 2015-06-19 08:05:23 -05:00
Derek Parker
b7d4815d15 Update documentation 2015-06-17 22:01:31 -05:00
Derek Parker
c720919b04 Update docs around thread.SetNextBreakpoints 2015-06-17 21:52:58 -05:00
Derek Parker
a59c67b783 Update documentation for Thread struct 2015-06-12 14:53:20 -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