Commit Graph

58 Commits

Author SHA1 Message Date
Alessandro Arzilli
200994bc8f
proc/*: only load floating point registers when needed (#1981)
Changes implementations of proc.Registers interface and the
op.DwarfRegisters struct so that floating point registers can be loaded
only when they are needed.
Removes the floatingPoint parameter from proc.Thread.Registers.
This accomplishes three things:

1. it simplifies the proc.Thread.Registers interface
2. it makes it impossible to accidentally create a broken set of saved
   registers or of op.DwarfRegisters by accidentally calling
   Registers(false)
3. it improves general performance of Delve by avoiding to load
   floating point registers as much as possible

Floating point registers are loaded under two circumstances:

1. When the Slice method is called with floatingPoint == true
2. When the Copy method is called

Benchmark before:

BenchmarkConditionalBreakpoints-4   	       1	4327350142 ns/op

Benchmark after:

BenchmarkConditionalBreakpoints-4   	       1	3852642917 ns/op

Updates #1549
2020-05-13 11:56:50 -07:00
aarzilli
bb2525a7d5 proc: keep debugger state consistent if callInjectionProtocol fails
pickCurrentThread should always run.
2020-05-01 10:15:29 -07:00
aarzilli
ae846a51f2 proc: StepOut remove if condition that is always true 2020-04-10 10:49:19 -07:00
aarzilli
7dedf1ed55 proc: simplify next/step/stepout condition code
Adds a library of utility functions to generated breakpoint conditions
for next, step and stepout.
2020-04-04 11:00:54 -07:00
aarzilli
431dea7ee6 proc: skip autogenerated wrappers when stepping in and out
Under some circumstances (methods with non-pointer receivers or from
embedded fields called through an interface) the compiler will
autogenerate wrapper functions.

This commit changes next, step and stepout to skip all autogenerated
wrappers.

Fixes #1908
2020-03-31 10:04:36 -07:00
Alessandro Arzilli
223e0a57ca
proc: convert Arch into a struct (#1972)
Replace the interface type Arch with a struct with the same
functionality.
2020-03-30 11:03:29 -07:00
Derek Parker
5177c247f6 pkg/proc: Remove unused parameter
Also cleanup some typos.
2020-03-28 16:32:09 +01:00
Derek Parker
4abf4f1c1f pkg/proc: Rename proc.go -> target_exec.go 2020-03-25 17:45:12 +01:00