1. 20 9月, 2018 1 次提交
  2. 31 8月, 2018 1 次提交
    • A
      proc,service,terminal: information about stack trace truncation · ac74944d
      aarzilli 提交于
      Add a flag to Stackframe that indicates where the stack frame is the
      bottom-most frame of the stack. This allows clients to know whether the
      stack trace terminated normally or if it was truncated because the
      maximum depth was reached.
      Add a truncation message to the 'stack' command.
      ac74944d
  3. 30 8月, 2018 1 次提交
    • A
      proc: fix type of some struct global variables · 0461af83
      aarzilli 提交于
      Normally variables that have a named struct as a type will get a
      typedef entry as their type, sometimes however the Go linker will
      decide to use the DW_TAG_structure_type entry instead.
      
      For consistency always wrap a struct type into a typedef when we are
      creating a new variables (see comment in newVariable for exceptions).
      
      This fixes a bug where it would be impossible to call methods on a
      global variable.
      0461af83
  4. 21 8月, 2018 1 次提交
  5. 17 8月, 2018 3 次提交
  6. 16 8月, 2018 2 次提交
    • A
      proc: use (*Variable).setValue in fncall · 9335c540
      aarzilli 提交于
      9335c540
    • A
      proc: change (*Variable).setValue for use in CallFunction · 12a3f8bb
      aarzilli 提交于
      Changes (*Variable).setValue so that it can be used in CallFunction to
      set up the argument frame for the function call, adding the ability to:
      - nil nillable types
      - set strings to the empty string
      - copy from one structure to another (including strings and slices)
      - convert any interface type to interface{}
      - convert pointer shaped types (map, chan, pointers, and structs
        consisting of a single pointer field) to interface{}
      
      This covers all cases where an assignment statement can be evaluated
      without allocating memory or calling functions in the target process.
      12a3f8bb
  7. 25 7月, 2018 1 次提交
    • A
      proc,service,terminal: read defer list · 8f1fc63d
      aarzilli 提交于
      Adds -defer flag to the stack command that decorates the stack traces
      by associating each stack frame with its deferred calls.
      
      Reworks proc.next to use this feature instead of using proc.DeferPC,
      laying the groundwork to implement #1240.
      8f1fc63d
  8. 14 7月, 2018 1 次提交
  9. 11 7月, 2018 1 次提交
  10. 10 7月, 2018 1 次提交
  11. 03 7月, 2018 1 次提交
    • A
      *: Fix log level setting in logrus · c53c43d1
      aarzilli 提交于
      Setting the Level field of a logrus logger doesn't actually do anything
      since the Level field simply reports the log level of the last log
      message emitted on the logger.
      The right way to do that is to set logger.Logger.Level.
      Also cleans up newline characters from log messages emitted through
      logrus and fixes the direction of the arrows in the messages emitted by
      rpccommon, which was inconsistent with the arrows of gdbserial.
      c53c43d1
  12. 29 6月, 2018 1 次提交
  13. 27 6月, 2018 1 次提交
    • A
      proc,terminal,service: let headless instances run without connected clients · 9a216211
      aarzilli 提交于
      This pull request makes several changes to delve to allow headless
      instancess that are started with the --accept-multiclient flag to
      keep running even if there is no connected client. Specifically:
      
      1. Makes a headless instance started with --accept-multiclient quit
          after one of the clients sends a Detach request (previously they
          would never ever quit, which was a bug).
      2. Changes proc/gdbserial and proc/native so that they mark the
          Process as exited after they detach, even if they did not kill the
          process during detach. This prevents bugs such as #1231 where we
          attempt to manipulate a target process after we detached from it.
      3. On non --accept-multiclient instances do not kill the target
          process unless we started it or the client specifically requests
          it (previously if the client did not Detach before closing the
          connection we would kill the target process unconditionally)
      4. Add a -c option to the quit command that detaches from the
          headless server after restarting the target.
      5. Change terminal so that, when attached to --accept-multiclient,
          pressing ^C will prompt the user to either disconnect from the
          server or pause the target process. Also extend the exit prompt to
          ask if the user wants to keep the headless server running.
      
      Implements #245, #952, #1159, #1231
      9a216211
  14. 26 6月, 2018 1 次提交
    • A
      rpccommon: restore API port message · 818ed0b2
      aarzilli 提交于
      This message is used by clients to determine the port that a headless
      instance is using, therefore the format can not change or move to a
      different file handle.
      
      Fixes #1245
      818ed0b2
  15. 22 6月, 2018 1 次提交
    • D
      *: Use structured logging · a208c897
      Derek Parker 提交于
      Implements structured logging via Logrus. This gives us a logger per
      boundry that we care about, allowing for easier parsing of logs if users
      have more than one log option enabled. Also, cleans up a lot of
      conditionals in the code by simply silencing the logger at creation as
      opposed to conditionally logging everywhere.
      a208c897
  16. 15 6月, 2018 2 次提交
    • A
      proc: allow "package/path".varname syntax · 2a2d1040
      aarzilli 提交于
      If the application being debugged imports two packages with the same
      name (but different paths) there was no way to disambiguate the two,
      since the character '/' can not appear inside a go identifier.
      
      By allowing users to use a string literal as the package name a package
      path can be specified.
      2a2d1040
    • A
      service,logflags: log all RPC messages · 454491ce
      aarzilli 提交于
      We occasionally receive bug reports from users of VSCode-go and GoLand.
      GoLand has its own way of capturing the packet exchange between itself
      and delve but VSCode-go (supposedly) doesn't.
      So far this hasn't been a problem since all bug reports were obvious
      bugs on the plugin or easy to reproduce without VSCode-go, but it might
      be helpful in the future to have a way to log the packet exchange
      between dlv and a frontend.
      
      This commit adds a --log-output option to enable logging of all rpc
      messages and changes service/rpccommon accordingly.
      454491ce
  17. 12 6月, 2018 1 次提交
    • A
      proc,service: display return values when stepping out of a function · 60c58acb
      aarzilli 提交于
      Displays the return values of the current function when we step out of
      it after executing a step, next or stepout command.
      
      Implementation of this feature is tricky: when the function has
      returned the return variables are not in scope anymore. Implementing
      this feature requires evaluating variables that are out of scope, using
      a stack frame that doesn't exist anymore.
      
      We can't calculate the address of these variables when the
      next/step/stepout command is initiated either, because between that
      point and the time where the stepout breakpoint is actually hit the
      goroutine stack could grow and be moved to a different memory address.
      60c58acb
  18. 19 5月, 2018 1 次提交
    • A
      proc/native,proc/gdbserial: let target access terminal · cc86bde5
      aarzilli 提交于
      Change the linux verison of proc/native and proc/gdbserial (with
      debugserver) so that they let the target process use the terminal when
      delve is launched in headless mode.
      
      Windows already worked, proc/gdbserial (with rr) already worked.
      I couldn't find a way to make proc/gdbserial (with lldb-server) work.
      
      No tests are added because I can't think of a way to test for
      foregroundness of a process.
      
      Fixes #65
      cc86bde5
  19. 24 4月, 2018 2 次提交
    • A
      proc: Flag shadowed arguments as shadowed · 7fd47749
      aarzilli 提交于
      Fixes #951
      7fd47749
    • A
      proc: cache entire frame in FrameToScope instead of variablesByTag · 21be5946
      aarzilli 提交于
      Caching the frame in variablesByTag is problematic:
      
      1. accounting for variables that are (partially) stored in registers is
      complicated (see issue #1106)
      2. for some types (strings, interfaces...) simply creating the Variable
      object reads memory, which therefore happens before we can do any
      caching.
      
      Instead cache the entire frame when the EvalScope object is created.
      The cached range is between the SP value of the current frame and the
      CFA of the preceeding frame, if available, or the CFA of the current
      frame otherwise.
      
      Fixes #1106
      21be5946
  20. 20 4月, 2018 1 次提交
  21. 14 4月, 2018 1 次提交
  22. 11 4月, 2018 2 次提交
  23. 23 3月, 2018 1 次提交
  24. 21 3月, 2018 1 次提交
  25. 20 3月, 2018 1 次提交
  26. 07 3月, 2018 1 次提交
    • A
      proc: remove proc.Process.Halt · e47599d0
      aarzilli 提交于
      The proper way to stop a running process is to call RequestManualStop,
      which most code already did with the exception of some old test code.
      e47599d0
  27. 14 2月, 2018 1 次提交
    • A
      dwarf/reader,proc: support DW_AT_abstract_origin (#1111) · 0c40a8f5
      Alessandro Arzilli 提交于
      debug_info entries can use DW_AT_abstract_origin to inherit the
      attributes of another entry, supporting this attribute is necessary to
      support DW_TAG_inlined_subroutine.
      
      Go, starting with 1.10, emits DW_TAG_inlined_subroutine entries when
      inlining is enabled.
      0c40a8f5
  28. 19 1月, 2018 2 次提交
    • A
      proc,prettyprint: guard against autodereferenced escaped pointers (#1077) · bec6a65b
      Alessandro Arzilli 提交于
      Much like the bug in issue #1031 and commit
      f6f6f0bf pointers can also escape to
      the heap and then have a zero address (and no children) when we
      autodereference.
      
      1. Mark autodereferenced escaped variables with a 0 address as
         unreadable.
      2. Add guards to the pretty printers for unsafe.Pointer and pointers.
      
      Fixes #1075
      bec6a65b
    • Y
      command/terminal: allow restart to change process args (#1060) · c5c41f63
      Yasushi Saito 提交于
      * command/terminal: allow restart to change process args
      
      Add -args flag to "restart" command. For example, "restart -args a b c" will
      pass args a b c to the new process.
      
      Add "-c" flag to pass the checkpoint name. This is needed to disambiguate the
      checkpoint name and arglist.
      
      Reverted unnecessary changes.
      
      * Applied reviewer comments.
      
      Vendored argv.
      
      Change the syntax of restart. When the target is is in recording mode, it always
      interprets the args as a checkpoint. Otherwise, it interprets the args as
      commandline args. The flag "-args" is still there, to handle the case in which
      the user wants to pass an empty args on restart.
      
      * Add restartargs.go.
      
      Change "restart -args" to "restart -noargs" to clarify that this flag is used to
      start a process with an empty arg.
      c5c41f63
  29. 06 1月, 2018 1 次提交
  30. 03 1月, 2018 1 次提交
  31. 21 12月, 2017 1 次提交
  32. 19 12月, 2017 1 次提交
    • A
      debugger/locations: locspec "+0" should always evaluate to the current PC · 3f2335f2
      aarzilli 提交于
      So far we have evaluated the locspec "+0" the same way we evaluate all
      "+n" locspecs, this means that we turn the current PC into a file:line
      pair, then we turn back the file:line into a PC address.
      
      Normally this is harmless, however all autogenerated code returns the
      source position "<autogenerated>:1" which resolves back to the very
      first autogenerated instruction in the code.
      
      This messes up the behaviour of the "disassemble" command which uses
      the locspec "+0" to figure out what code to disassemble if no arguments
      are passed.
      
      We should make +0 always resolve to the current PC (of the given scope)
      so that clients can use +0 as a default locspec.
      3f2335f2
  33. 14 12月, 2017 1 次提交