1. 31 1月, 2018 1 次提交
  2. 28 1月, 2018 3 次提交
  3. 27 1月, 2018 2 次提交
  4. 25 1月, 2018 1 次提交
  5. 19 1月, 2018 4 次提交
    • 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
    • A
      proc_test: deflake TestSystemstackOnRuntimeNewstack (#1078) · bc77ff45
      Alessandro Arzilli 提交于
      Depending on how the runtime schedules our goroutines we can get
      unlucky and have the first call to runtime.newstack we intercept be for
      a different goroutine (usually the garbage collector).
      Only check stacktraces that happen on the same goroutine that executed
      main.main.
      bc77ff45
    • C
      Add "l" alias for list command (#1080) · 3f3de1a9
      Chad Whitacre 提交于
      Help out those of us habituated to pdb. <:^)
      
      https://docs.python.org/3/library/pdb.html
      3f3de1a9
    • 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
  6. 06 1月, 2018 1 次提交
    • A
      proc: avoid scanning system stack if it's not executing cgo · 7bec20e5
      aarzilli 提交于
      The runtime calls into g0 in many places, not necessarily using
      runtime.systemstack or runtime.asmcgocall.
      One example of this is the call to runtime.newstack inside
      runtime.morestack.
      
      If we stop the process while one goroutine is executing
      runtime.newstack we would be unable to fully scan its stack because we
      don't know that we have to switch back to the goroutine stack after
      runtime.newstack.
      
      Instead of tracking down every possible way that the runtime switches
      to g0 we switch to the goroutine stack immediately after the top of the
      stack, unless cgo is being executed on the systemstack.
      
      Fixes #1066
      7bec20e5
  7. 04 1月, 2018 1 次提交
  8. 03 1月, 2018 1 次提交
  9. 21 12月, 2017 1 次提交
  10. 19 12月, 2017 2 次提交
    • A
      dwarf/line: fix output for the last line of a compile unit · 0fc4ed80
      aarzilli 提交于
      The last entry of the debug_line table is supposed to be valid for
      every PC address greater than its address.
      0fc4ed80
    • 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
  11. 14 12月, 2017 4 次提交
  12. 08 12月, 2017 2 次提交
  13. 29 11月, 2017 3 次提交
    • A
      pkg/terminal: -offsets flag for stack command · 17bd4b52
      aarzilli 提交于
      Prints the frame and frame pointer offsets for each frame.
      17bd4b52
    • A
      proc: support cgo stacktraces · 5372588c
      aarzilli 提交于
      When creating a stack trace we should switch between the goroutine
      stack and the system stack (where cgo code is executed) as appropriate
      to reconstruct the logical stacktrace.
      
      Goroutines that are currently executing on the system stack will have
      the SystemStack flag set, frames of the goroutine stack will have a
      negative FrameOffset (like always) and frames of the system stack will
      have a positive FrameOffset (which is actually just the CFA value for
      the frame).
      
      Updates #935
      5372588c
    • A
      cmd, proc/test: disable optimizations on the C compiler · 5fdcd2c9
      aarzilli 提交于
      Pass CGO_FLAGS='-O0 -g' to go build to disable optimizations when
      calling the C compiler.
      5fdcd2c9
  14. 22 11月, 2017 3 次提交
  15. 21 11月, 2017 5 次提交
    • A
      pkg/proc: fix StepBreakpoint handling · bc86c662
      aarzilli 提交于
      StepBreakpoints are set on CALL instructions, when they are hit we
      disassemble the current instruction, figure out the destination address
      and set a breakpoint after the prologue of the called function.
      
      In order to disassemble the current instruction we disassemble the area
      of memory starting from PC and going to PC+15 (because 15 bytes is the
      maximum length of one instruction on AMD64). This means that we won't
      just disassemble one instruction but also a few instructions following
      it ending with one truncated instruction.
      
      This usually works fine but sometimes the disassembler will panic with
      an array out of bounds error when trying to disassemble a truncated
      instruction. To avoid this problem this commit changes the funciton
      disassemble to take one extra parameter, singleInstr, when singleInstr
      is set disassemble will quit after disassembling a single instruction.
      bc86c662
    • A
      proc: automatically dereference interfaces on member access · 5f0f77f4
      aarzilli 提交于
      If 'iv' is an interface variable with a struct as a concrete value let
      'iv.A' evaluate to the access to field 'A' of the concrete value of
      'iv'.
      5f0f77f4
    • A
      proc: support access to chan buffers · 844762a8
      aarzilli 提交于
      Replace the unsafe.Pointer type of the buf field of channels with the
      appropriate array type, allow expressions accessing member field of the
      channel struct.
      
      Fixes #962
      844762a8
    • A
      proc: next should not skip lines with conditional bps · 1ced7c3a
      aarzilli 提交于
      Conditional breakpoints with unmet conditions would cause next and step
      to skip the line.
      
      This breakpoint changes the Kind field of proc.Breakpoint from a single
      value to a bit field, each breakpoint object can represent
      simultaneously a user breakpoint and one internal breakpoint (of which
      we have several different kinds).
      
      The breakpoint condition for internal breakpoints is stored in the new
      internalCond field of proc.Breakpoint so that it will not conflict with
      user specified conditions.
      
      The breakpoint setting code is changed to allow overlapping one
      internal breakpoint on a user breakpoint, or a user breakpoint on an
      existing internal breakpoint. All other combinations are rejected. The
      breakpoint clearing code is changed to clear the UserBreakpoint bit and
      only remove the phisical breakpoint if no other bits are set in the
      Kind field. ClearInternalBreakpoints does the same thing but clearing
      all bits that aren't the UserBreakpoint bit.
      
      Fixes #844
      1ced7c3a
    • A
      proc: breakpoints refactoring · 178589a4
      aarzilli 提交于
      Move some duplicate code, related to breakpoints, that was in both
      backends into a single place.
      This is in preparation to solve issue #844 (conditional breakpoints
      make step and next fail) which will make this common breakpoint code
      more complicated.
      178589a4
  16. 18 11月, 2017 2 次提交
    • A
      pkg/proc: remove callFrameRegs from stackIterator · 8d34bb5b
      aarzilli 提交于
      Since it's just a scratchpad to calculate the new set of registers it
      makes more sense to have it as a local variable in Next and
      advanceRegs.
      8d34bb5b
    • A
      proc: refactor stack.go to use DWARF registers · f4e2000f
      aarzilli 提交于
      Instead of only tracking a few cherrypicked registers in stack.go track
      all DWARF registers.
      
      This is needed for cgo code and for the locationlists emitted by go in
      1.10:
      * The debug_frame sections emitted by C compilers can not be used
        without tracking all registers
      * the loclists emitted by go1.10 need all registers of a frame to be
        interpreted.
      f4e2000f
  17. 16 11月, 2017 2 次提交
  18. 04 11月, 2017 2 次提交