1. 15 12月, 2020 2 次提交
  2. 11 12月, 2020 3 次提交
  3. 09 12月, 2020 2 次提交
  4. 05 12月, 2020 1 次提交
  5. 18 11月, 2020 1 次提交
  6. 17 11月, 2020 4 次提交
  7. 13 11月, 2020 1 次提交
  8. 10 11月, 2020 1 次提交
    • A
      proc/*: remove proc.Thread.Blocked, refactor memory access (#2206) · 08433760
      Alessandro Arzilli 提交于
      On linux we can not read memory if the thread we use to do it is
      occupied doing certain system calls. The exact conditions when this
      happens have never been clear.
      
      This problem was worked around by using the Blocked method which
      recognized the most common circumstances where this would happen.
      
      However this is a hack: Blocked returning true doesn't mean that the
      problem will manifest and Blocked returning false doesn't necessarily
      mean the problem will not manifest. A side effect of this is issue
      #2151 where sometimes we can't read the memory of a thread and find its
      associated goroutine.
      
      This commit fixes this problem by always reading memory using a thread
      we know to be good for this, specifically the one returned by
      ContinueOnce. In particular the changes are as follows:
      
      1. Remove (ProcessInternal).CurrentThread and
      (ProcessInternal).SetCurrentThread, the "current thread" becomes a
      field of Target, CurrentThread becomes a (*Target) method and
      (*Target).SwitchThread basically just sets a field Target.
      
      2. The backends keep track of their own internal idea of what the
      current thread is, to use it to read memory, this is the thread they
      return from ContinueOnce as trapthread
      
      3. The current thread in the backend and the current thread in Target
      only ever get synchronized in two places: when the backend creates a
      Target object the currentThread field of Target is initialized with the
      backend's current thread and when (*Target).Restart gets called (when a
      recording is rewound the currentThread used by Target might not exist
      anymore).
      
      4. We remove the MemoryReadWriter interface embedded in Thread and
      instead add a Memory method to Process that returns a MemoryReadWriter.
      The  backends will return something here that will read memory using
      the current thread saved by the backend.
      
      5. The Thread.Blocked method is removed
      
      One possible problem with this change is processes that have threads
      with different memory maps. As far as I can determine this could happen
      on old versions of linux but this option was removed in linux 2.5.
      
      Fixes #2151
      08433760
  9. 04 11月, 2020 1 次提交
    • A
      proc/native: fix flakyness of TestStepConcurrentDirect on linux/386 (#2179) · e69d536e
      Alessandro Arzilli 提交于
      TestStepConcurrentDirect will occasionally fail (7% of the time on my
      setup) by either causing the target processs to execute an invalid
      instruction or (more infrequently) by switching to the wrong thread.
      
      Both of those are caused by receiving SIGTRAPs for threads hitting a
      breakpoint after it has been removed (the thread hits the breakpoint,
      we stop everything and remove the breakpoint and only after we receive
      the signal).
      
      Change native.(*nativeProcess).stop to handle SIGTRAPs that can't be
      attributed to a breakpoint, a hardcoded breakpoint in the program's
      text, or manual stops (and therefore are likely caused by phantom
      breakpoint hits).
      Co-authored-by: Na <a@kra>
      e69d536e
  10. 03 11月, 2020 2 次提交
  11. 22 10月, 2020 3 次提交
  12. 20 10月, 2020 1 次提交
  13. 13 10月, 2020 3 次提交
  14. 24 9月, 2020 3 次提交
    • A
      proc/tests: keep track of tests skipped due to backend problems (#2178) · 84328ed8
      Alessandro Arzilli 提交于
      * proc/tests: keep track of tests skipped due to backend problems
      
      Mark tests skipped due to backend problems and add a script to keep
      track of them.
      
      * Travis-CI: add ignorechecksum option to chocolatey command
      
      Looks like a configuration problem on chocolatey's end.
      84328ed8
    • A
      proc: use argument position for addr only when injecting function calls (#2181) · 7e00666b
      Alessandro Arzilli 提交于
      * proc: use argument position for addr only when injecting function calls
      
      We can not, in general, use the argument position to determine the
      address of a formal parameter, it will not work in presence of
      optimizations or inlining. In those cases formal arguments could be
      stored in registers.
      
      Fixes #2176
      
      * Travis-CI: add ignorechecksum option to chocolatey command
      
      Looks like a configuration problem on chocolatey's end.
      Co-authored-by: Na <a@kra>
      7e00666b
    • A
      dwarf/line: ignore end_of_sequence entry if AllPCsBetween (#2180) · 2bd38fff
      Alessandro Arzilli 提交于
      * dwarf/line: ignore end_of_sequence entry if AllPCsBetween
      
      Go 1.15 (but possibly prior versions of Go too) has a tendency to use
      an address in the middle of an instruction for this entry, but if it
      was correct it would be after the last instruction of the function
      anyway.
      
      This problem manifests especially frequently as a target crash in
      TestStepConcurrentPtr on linux/arm64 (~6% of the runs).
      
      * Travis-CI: add ignorechecksum option to chocolatey command
      
      Looks like a configuration problem on chocolatey's end.
      Co-authored-by: Na <a@kra>
      2bd38fff
  15. 16 9月, 2020 2 次提交
    • A
      proc: resolve symlinks when searching for split debug_info if path is /proc/pid/exe (#2170) · 85952c08
      Alessandro Arzilli 提交于
      * Revert "proc: Find executable should follow symbol links."
      
      This reverts commit 3e04ad0f.
      
      * proc: resolve symlinks when searching for split debug_info if path is /proc/pid/exe
      
      Fixes #2168
      85952c08
    • A
      proc/gdbserial: fix two protocol bugs (#2172) · 4dc8aedc
      Alessandro Arzilli 提交于
      During the testing of the core dump generation feature two bugs were
      discovered in gdbserial:
      
      1. we don't check that both bytes of the checksum are read, if the
         buffer only has one byte we can end up reading only one byte instead
         of two and the second byte will mess up the parsing of the next
         packet
      2. binary encoded packets can start with an 'E' and not be errors, when
         using binary responses add an extra check for the lenght of the
         response before deciding that the response is an error.
         Unfortunately this encoding is inherently ambiguous (we can't
         distinguish a 3 byte response starting with 'E' from an error) so
         binary requests that lead to short responses should be avoided.
      
      Testing this is complicated, they will be tested implicitly by the
      upcoming core dump test.
      Co-authored-by: Na <a@kra>
      4dc8aedc
  16. 11 9月, 2020 1 次提交
  17. 10 9月, 2020 1 次提交
    • A
      proc/*,service: replace uses of uintptr with uint64 (#2163) · 12009e98
      Alessandro Arzilli 提交于
      Since proc is supposed to work independently from the target
      architecture it shouldn't use architecture-dependent types, like
      uintptr. For example when reading a 64bit core file on a 32bit
      architecture, uintptr will be 32bit but the addresses proc needs to
      represent will be 64bit.
      12009e98
  18. 09 9月, 2020 1 次提交
  19. 02 9月, 2020 1 次提交
    • A
      cmd,proc,terminal,debugger: Support default file descriptor redirects · 7555d1c0
      aarzilli 提交于
      Adds features to support default file descriptor redirects for the
      target process:
      
      1. A new command line flag '--redirect' and '-r' are added to specify
         file redirects for the target process
      2. New syntax is added to the 'restart' command to specify file
         redirects.
      3. Interactive instances will check if stdin/stdout and stderr are
         terminals and print a helpful error message if they aren't.
      7555d1c0
  20. 01 9月, 2020 3 次提交
  21. 28 8月, 2020 1 次提交
  22. 25 8月, 2020 2 次提交