1. 22 11月, 2018 2 次提交
  2. 21 11月, 2018 4 次提交
    • A
      proc: correctly extract name of functions that have been inlined · 3048b960
      aarzilli 提交于
      If a function can be inlined it will appear as two entries in
      debug_info. A DW_TAG_subprogram entry with DW_AT_inlined = true (that
      will be used as the abstract origin) and a second DW_TAG_subprogram
      entry with an abstract origin.
      To retrieve the name of this second entry we must load its abstract
      origin.
      3048b960
    • A
      proc/*: allow stepping into functions without debug_info symbols · b8ed126b
      aarzilli 提交于
      If proc.Step encounters a CALL instruction that points to an address
      that isn't associated with any function it should still follow the
      CALL.
      
      The circumstances creating this problem do not normally occur, it was
      encountered in the process of fixing a bug created by Go1.12.
      b8ed126b
    • A
      tests: minor fixes for Go 1.12 · f813520e
      aarzilli 提交于
      f813520e
    • A
      proc: remove inversion of return variables from returnBreakpointInfo · f8c0c37f
      aarzilli 提交于
      It was never true that return variables were in the inverse order.
      Instead in Go1.11 return variables are saved in debug_info in an
      arbitrary order and inverting them just happened to work for this
      specific example.
      
      This bug was fixed in Go 1.12, regardless we should attempt to
      rearrange return variables anyway.
      f8c0c37f
  3. 20 11月, 2018 2 次提交
    • A
      proc: do not panic if we can't satisfy a composite location · 7f53117e
      aarzilli 提交于
      When a location expression requests a register check that we have as
      many bytes in the register as requested and if we don't report the
      error.
      
      Updates #1416
      7f53117e
    • S
      proc/proc: Extend GoroutinesInfo to allow specifying a range · 11accd4d
      Sergio Lopez 提交于
      Instead of unconditionally returning all present goroutines,
      GoroutinesInfo now allows specifying a range (start and count). In
      addition to the array of goroutines and the error, it now also returns
      the next goroutine to be processed, to be used as 'start' argument on
      the next call, or 0 if all present goroutines have already been
      processed.
      
      This way clients can avoid eating large amounts of RAM while debugging
      core dumps and processes with a exceptionally high amount of goroutines.
      
      Fixes #1403
      11accd4d
  4. 16 11月, 2018 2 次提交
  5. 14 11月, 2018 1 次提交
  6. 10 11月, 2018 1 次提交
    • A
      proc: Improve performance of loadMap on very large sparse maps · 89c8da65
      aarzilli 提交于
      Users can create sparse maps in two ways, either by:
      a) adding lots of entries to a map and then deleting most of them, or
      b) using the make(mapType, N) expression with a very large N
      
      When this happens reading the resulting map will be very slow
      because loadMap needs to scan many buckets for each entry it finds.
      
      Technically this is not a bug, the user just created a map that's
      very sparse and therefore very slow to read. However it's very
      annoying to have the debugger hang for several seconds when trying
      to read the local variables just because one of them (which you
      might not even be interested into) happens to be a very sparse map.
      
      There is an easy mitigation to this problem: not reading any
      additional buckets once we know that we have already read all
      entries of the map, or as many entries as we need to fulfill the
      MaxArrayValues parameter.
      
      Unfortunately this is mostly useless, a VLSM (Very Large Sparse Map)
      with a single entry will still be slow to access, because the single
      entry in the map could easily end up in the last bucket.
      
      The obvious solution to this problem is to set a limit to the
      number of buckets we read when loading a map. However there is no
      good way to set this limit.
      If we hardcode it there will be no way to print maps that are beyond
      whatever limit we pick.
      We could let users (or clients) specify it but the meaning of such
      knob would be arcane and they would have no way of picking a good
      value (because there is no objectively good value for it).
      
      The solution used in this commit is to set an arbirtray limit on
      the number of buckets we read but only when loadMap is invoked
      through API calls ListLocalVars and ListFunctionArgs. In this way
      `ListLocalVars` and `ListFunctionArgs` (which are often invoked
      automatically by GUI clients) remain fast even in presence of a
      VLSM, but the contents of the VLSM can still be inspected using
      `EvalVariable`.
      89c8da65
  7. 09 11月, 2018 4 次提交
  8. 07 11月, 2018 3 次提交
    • D
      *: Switch to using Go modules · 4927bc6c
      Derek Parker 提交于
      4927bc6c
    • A
      pkg/core: make code in core.go OS/arch agnostic · 7d0d2cb3
      aarzilli 提交于
      Make code in core.go OS and architecture agnostic in preparation for
      adding Windows minidump support.
      7d0d2cb3
    • A
      tests: rename _fixtures/vendor to _fixtures/internal · 73d636f7
      aarzilli 提交于
      Some tests used a fake vendor directory placed inside _fixtures to
      import some support packages.
      In go.mod mode vendor directory are only supported on the root of the
      project, which breaks some of our tests.
      Since vendor directories outside the root of the project are so rare
      anyway it's possible that a future version of go will stop supporting
      it even in GOPATH mode.
      Also it was weird and unnecessary in the first place anyawy.
      73d636f7
  9. 01 11月, 2018 1 次提交
  10. 23 10月, 2018 1 次提交
  11. 20 10月, 2018 2 次提交
    • D
      *: Show return values on CLI trace · 3129aa73
      Derek Parker 提交于
      This patch allows the `trace` CLI subcommand to display return values of
      a function. Additionally, it will also display information on where the
      function exited, which could also be helpful in determining the path
      taken during function execution.
      
      Fixes #388
      3129aa73
    • A
      proc/native: Mask MS_VC_EXCEPTION [windows] · 4db99398
      aarzilli 提交于
      Some libraries (for example steam_api64.dll) will send this exception
      code to set the thread name on Microsoft VisualC.
      In theory it should be fine to send the exception back to the target,
      which is responsible for setting a handler for it, in practice in some
      cases (steam_api64.dll) this will crash the program. So we'll mask it
      instead.
      
      Fixes #1383
      4db99398
  12. 19 10月, 2018 1 次提交
  13. 18 10月, 2018 5 次提交
  14. 16 10月, 2018 3 次提交
  15. 12 10月, 2018 1 次提交
    • A
      proc: support position independent executables (PIE) · 74c98bc9
      aarzilli 提交于
      Support for position independent executables (PIE) on the native linux
      backend, the gdbserver backend on linux and the core backend.
      Also implemented in the windows native backend, but it can't be tested
      because go doesn't support PIE on windows yet.
      74c98bc9
  16. 11 10月, 2018 1 次提交
  17. 09 10月, 2018 2 次提交
  18. 03 10月, 2018 1 次提交
    • A
      proc/native,Makefile: allow compiling on macOS without native backend · 910f90c3
      aarzilli 提交于
      On macOS 10.14 Apple changed the command line tools so that system
      headers now need to be manually installed.
      
      Instead of adding one extra install step to the install procedure add a
      build tag to allow compilation of delve without the native backend on
      macOS. By default (i.e. when using `go get`) this is how delve will be
      compiled on macOS, the make script is changed to enable compiling the
      native backend if the required dependencies have been installed.
      
      Insure that both configuration still build correctly on Travis CI and
      change the documentation to describe how to compile the native backend
      and that it isn't normally needed.
      
      Fixes #1359
      910f90c3
  19. 28 9月, 2018 1 次提交
  20. 26 9月, 2018 2 次提交