1. 05 5月, 2021 4 次提交
  2. 04 5月, 2021 1 次提交
  3. 29 4月, 2021 2 次提交
  4. 27 4月, 2021 2 次提交
    • F
      examinememory: evaluate addr as expression (#2385) · 7bf5482b
      Felix Geisendörfer 提交于
      * examinememory: evaluate addr as expression
      
      This makes it easy to read memory locations at an offset of a known
      address, e.g.:
      
      x 0xc000046800 + 32
      
      * use feedback from @aarzilli
      
      - expression mode is now enabled via -x flag
      - support "-x var", "-x &var" in addition to "-x <addr expr>"
      - some refactoring
      
      * add test cases
      
      * deal with double spaces
      
      * update docs
      
      * add new failing test
      
      * fix docs
      
      * simplify implementation, update test & docs
      
      * Fix docs
      7bf5482b
    • S
      service/dap: add go build stderr to error response (#2448) · bbae9a9d
      Suzy Mueller 提交于
      * service/dap: add go build stderr to error response
      
      * service/dap: add go build stderr to error response
      
      * Skip message check for build errors
      
      * test for flag provided message
      bbae9a9d
  5. 23 4月, 2021 1 次提交
  6. 22 4月, 2021 3 次提交
  7. 20 4月, 2021 3 次提交
    • S
      service/dap: rename launch configuration 'wd' to 'cwd' (#2433) · af1796d1
      Suzy Mueller 提交于
      Rename the launch configuration for specifying the working directory.
      af1796d1
    • S
      service/dap: annotate shadowed variable names in variables request (#2428) · 2408ed87
      Suzy Mueller 提交于
      * service/dap: annotate shadowed variable names in variables request
      
      In order to distinguish variables that are shadowed, this change
      updates the names from 'name' to '(name)'. This is the same syntax
      used in the terminal package.
      
      * remove unnecessary comment
      
      * Add todo for evaluate name
      
      * Check the evaluateName result is the unshadowed var
      2408ed87
    • A
      service/rpccommon: fix shutdown related bugs (#2439) · e3d43887
      Alessandro Arzilli 提交于
      * service/rpcommon: resolve race between Detach and shutdown
      
      Detach will close DisconnectChan causing the server to initiate
      shutdown, there is a race between Detach writing its response to the
      client and the shutdown terminating the server process.
      If Detach loses the race the response to the Detach request is never
      sent to the client and the client will report an EOF error instead.
      
      This change delays the start of the shutdown process until after Detach
      has written its response.
      
      Fixes an occasional failure of TestContinue.
      
      * service/rpccommon: ignore listener error when shutting down
      
      Ignore the closed listener error when the server is being shut down in
      response to a SIGINT signal.
      
      Fixes #1633
      e3d43887
  8. 17 4月, 2021 1 次提交
  9. 16 4月, 2021 1 次提交
    • S
      service/dap: add substitutePath configuration (#2379) · 4eb54b01
      Suzy Mueller 提交于
      * service/dap: add substitutePath configuration
      
      Similar to substitute-path configuration in the dlv cli, substitutePath
      in dap allows users to specify path mappings that are applied to the
      source files in stacktrace and breakpoint requests.
      
      Updates #2203
      
      * service/dap: refactor the startup of the fixture for attach
      
      Add a helper function for starting up a process to attach to.
      
      * service/dap: update substitute path tests for windows
      
      * service/dap: remove lines that should have been removed in merge
      
      * respond to comments on pr
      
      * move logging to helper functions
      
      * make test comments more clear
      
      * Add comments about absolute paths
      
      * fix log messages
      
      * clarify test comments
      
      * remove comment about absolute paths
      4eb54b01
  10. 14 4月, 2021 1 次提交
  11. 13 4月, 2021 7 次提交
  12. 09 4月, 2021 1 次提交
  13. 08 4月, 2021 1 次提交
  14. 07 4月, 2021 1 次提交
  15. 06 4月, 2021 3 次提交
    • A
      proc: be more lenient when parsing debug_info (#2394) · 618f3669
      Alessandro Arzilli 提交于
      - allow a concrete subprogram to be treated as the abstract origin for an inlined call
      - allow nameless concrete and abstract subprograms
      
      Fixes #2393
      618f3669
    • H
      dap: change how noDebug launch request is served (#2407) · da27e342
      Hyang-Ah Hana Kim 提交于
      * dap: change how noDebug launch request is served
      
      PR #2400 added support for noDebug launch requests - that was done
      by directly starting the target program using os/exec.Cmd and blocking
      the launch request indefinitely until the program terminates or
      is stopped with a disconnect request (when dlv dap can support it).
      Even though the approach seemed to work for user, that adds an extra
      control flow and complexity to the codebase.
      
      This change takes a different approach to implement the noDebug
      launch feature. Instead of using os/exec.Cmd, this uses the existing
      debug launch path, but avoids setting breakpoints. Finally, the program
      will start upon receiving onConfigurationDoneRequest and blocks there
      until the program terminates. This simplifies the code.
      
      The DAP spec does not explicitly specify what to do about other
      requests. It seems like VSCode can issue evaluate requests or other
      requests after the configuration done request. Currently they are
      blocked because the program is in running state. We can consider checking
      s.noDebug and responding with an error in the future if we want/need to.
      
      See the log below for a typical DAP request/response sequence:
      
      2021-03-29T01:42:53-04:00 debug layer=dap building binary at /Users/hakim/projects/s/__debug_bin
      2021-03-29T01:42:55-04:00 info layer=debugger launching process with args: [/Users/hakim/projects/s/__debug_bin]
      2021-03-29T01:42:55-04:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"initialized"}
      2021-03-29T01:42:55-04:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":2,"success":true,"command":"launch"}
      2021-03-29T01:42:55-04:00 debug layer=dap [<- from client]{"seq":3,"type":"request","command":"setBreakpoints","arguments":{"source":{"name":"main.go","path":"/Users/hakim/projects/s/main.go"},"breakpoints":[{"line":9}],"lines":[9]}}
      2021-03-29T01:42:55-04:00 error layer=dap Unable to set or clear breakpoints: running in noDebug mode
      2021-03-29T01:42:55-04:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":3,"success":false,"command":"setBreakpoints","message":"Unable to set or clear breakpoints","body":{"error":{"id":2002,"format":"Unable to set or clear breakpoints: running in noDebug mode"}}}
      2021-03-29T01:42:55-04:00 debug layer=dap [<- from client]{"seq":4,"type":"request","command":"configurationDone","arguments":{}}
      2021-03-29T01:42:55-04:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":4,"success":true,"command":"configurationDone"}
      2021-03-29T01:42:55-04:00 debug layer=debugger continuing
      Hello
      2021-03-29T01:43:00-04:00 debug layer=dap [-> to client]{"seq":0,"type":"event","event":"terminated","body":{}}
      2021-03-29T01:43:00-04:00 debug layer=dap [<- from client]{"seq":5,"type":"request","command":"threads"}
      2021-03-29T01:43:00-04:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":5,"success":true,"command":"threads","body":{"threads":null}}
      2021-03-29T01:43:00-04:00 debug layer=dap [<- from client]{"seq":6,"type":"request","command":"disconnect","arguments":{}}
      2021-03-29T01:43:00-04:00 debug layer=dap [-> to client]{"seq":0,"type":"response","request_seq":6,"success":true,"command":"disconnect"}
      2021-03-29T01:43:00-04:00 debug layer=debugger halting
      2021-03-29T01:43:00-04:00 error layer=dap Process 27219 has exited with status 0
      2021-03-29T01:43:00-04:00 debug layer=debugger detaching
      
      Updates https://github.com/golang/vscode-go/issues/1111
      
      * service/dap: address polina's comments for noDebug logic
      
      Reworked so the noDebug launch request again blocks launch request
      handler after responding with the launch response. By skipping
      the initialized event, it should prevent well-behaving clients from
      sending any further requests. Currently, doesn't matter because
      the handler goroutine will be blocked until the program termination
      anyway.
      
      Placed mutex back, since I noticed that's the only way to prevent
      racing between Stop and the handler goroutine. The synchronization
      lotic (in particular, during teardown) should be revisited after
      asynchronous request support work is done.
      
      * dap: address more comments
      da27e342
    • A
      proc/gdbserial: remove unnecessary conditional compilation (#2389) · 7ace7a8e
      Alessandro Arzilli 提交于
      Remove unnecessary conditionally compiled files introduced with the
      darwin/arm64 port.
      7ace7a8e
  16. 03 4月, 2021 3 次提交
  17. 26 3月, 2021 2 次提交
  18. 25 3月, 2021 1 次提交
  19. 24 3月, 2021 1 次提交
    • H
      service/dap: supports noDebug launch requests (#2400) · 3c1b9427
      Hyang-Ah Hana Kim 提交于
      If the launch requests has noDebug attribute set, run the built
      binary directly. The launch request handler will block until
      the binary terminates, so the editor won't send additional requests
      like breakpoint setting etc. Still disconnect or restart requests
      can flow in though and they should trigger killing of the target
      process if it's still running.
      
      In order to run the binary using os/exec on windows, the target
      binary has to have .exe as its extension. So, add .exe to the default
      output name if it is on windows. I am not sure though yet we want
      to modify the user-specified output or not yet. Considering how
      go commands behave (not automatically append .exe for 'go build -o')
      I think respecting what user specified is right, but the failure
      (file not exist) may be mysterious.
      3c1b9427
  20. 23 3月, 2021 1 次提交
    • S
      service/dap: use specified working directory for launch requests (#2360) · 1c9a1052
      Suzy Mueller 提交于
      * service/dap: use specified working directory for launch requests
      
      If a user specifies a working directory in the launch request,
      then the process should use that working directory. This may
      affect how the program runs and the user should be able to have
      control over this.
      
      * service/dap: add tests for launch with working dir
      
      Added tests to make sure the working directory is set correctly.
      
      * service/dap: fix TestWorkingDir on windows
      
      * service/dap: use %q to print quoted string
      
      * cmd/dlv: update dap warning about working dir
      
      * service/dap: change the launch argument to be wd`
      
      * update warning to specify only launch request
      1c9a1052