Commit Graph

24 Commits

Author SHA1 Message Date
polinasok
6a25ee09f5
go.mod: update google/go-dap to 0.5.0 (#2460)
* go.mod: update google/go-dap to 0.5.0

* Go mod tidy

Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2021-05-04 12:33:50 -07:00
polinasok
731f5ed346
go.mod: update google/go-dap to 0.4.0 (#2248)
Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>
2020-12-04 08:58:55 -08:00
Eli Bendersky
347777295d
service/dap: pull in newer version of google/go-dap (#2167)
Pulls in v0.3.0 of google/go-dap; this version has some fixes and API
improvements which service/dap will be able to leverage to clean up some
code.
2020-09-15 14:43:13 -07:00
Alessandro Arzilli
7dde930033
terminal: use new mechanism to cancel starlark threads (#2149)
* vendor: update starlark

* terminal: use new mechanism to cancel starlark threads

See: https://github.com/google/starlark-go/pull/298
2020-08-24 13:36:12 -07:00
Waleed Gadelkareem
b14182324d
Update cosiner/argv to v0.1.0 (#2088) 2020-06-24 10:00:37 -07:00
Álex Sáez
95e7cafd0c
terminal/command: Add 'reload' command (#1971)
* terminal/command: Add 'reload' command

These changes add the 'reload' command, which allows us to rebuild the project
and start the debugging session again. Currently, if the project's code is
updated while debugging it, Delve shows the new source code, but it's still
running the old one. With 'reload', the whole binary is rebuilt, and the
process starts again.

Fixes #1551

* Remove unnecessary print

Changes to be committed:
      modified:   pkg/terminal/command.go

* Add tests and refactor the code

Changes to be committed:
      modified:   cmd/dlv/cmds/commands.go
      modified:   go.mod
      modified:   pkg/terminal/command.go
      modified:   service/config.go
      modified:   service/debugger/debugger.go
      modified:   service/test/integration2_test.go

* Fix typo in the comment

Changes to be committed:
      modified:   service/debugger/debugger.go

* Fix typo in the name of the variables

The variables are local therefore the capitalization is not needed

Changes to be committed:
      modified:   cmd/dlv/cmds/commands.go

* Call GoTestBuild

Also, remove the := to avoid redeclaration

* Change the Kind in the tests

Change from debugger.ExecutingGeneratedTest to
debugger.ExecutingGeneratedFile for consistency.
We are generating a real binary instead of a test
one so ExecutingGeneratedFile makes more sense here.

Changes to be committed:
      modified:   service/test/integration2_test.go

* Avoid breakpoints based on addresses

Changes to be committed:
      modified:   service/debugger/debugger.go

* Update the rebuild behaviour

There are a few cases where we can't rebuild the binary because we don't
know how it was build.

Changes to be committed:
      modified:   service/debugger/debugger.go

* Fix typos and update documentation

Changes to be committed:
      modified:   Documentation/cli/README.md
      modified:   pkg/terminal/command.go
      modified:   service/config.go
      modified:   service/debugger/debugger.go

* Fix typo

* Remove variables

They were added to the debugger.Config

* Rename variable

Rename Kind to ExecuteKind to make it more accurate

Changes to be committed:
      modified:   cmd/dlv/cmds/commands.go
      modified:   service/debugger/debugger.go
      modified:   service/test/integration2_test.go
2020-06-05 11:03:09 -07:00
Alessandro Arzilli
9881edaa99
vendor: remove github.com/pkg/profile dependency (#2053)
It is only used in benchmarks and 'go test' now has command line
options to enable profiling as appropriate (but maybe it didn't in
2014).
2020-05-14 10:16:09 -07:00
Alessandro Arzilli
a33be4466f
vendor: update logrus dependency (#2048)
Fixes #2037
2020-05-11 15:44:01 -07:00
Derek Parker
3e60ae202b *: Add --tty flag for debug / exec
This flag allows users on UNIX systems to set the tty for the program
being debugged by Delve. This is useful for debugging command line
applications which need access to their own TTY, and also for
controlling the output of the debugged programs so that IDEs may open a
dedicated terminal to show the output for the process.
2020-04-10 09:53:13 -07:00
Derek Parker
c4fd80fcd0 pkg/proc: Clean up proc.go
This patch moves out unrelated types, variables and functions from
proc.go into a place where they make more sense.
2020-03-24 09:45:29 +01:00
Alessandro Arzilli
7cd12c34fd
proc,dwarf: cache debug.Entry objects (#1931)
Instead of rescanning debug_info every time we want to read a function
(either to find inlined calls or its variables) cache the tree of
dwarf.Entry that we would generate and use that.

Benchmark before:

BenchmarkConditionalBreakpoints-4   	       1	5164689165 ns/op

Benchmark after:

BenchmarkConditionalBreakpoints-4   	       1	4817425836 ns/op

Updates #1549
2020-03-20 10:23:10 -07:00
Derek Parker
731a7fc125 *: consolidate appends where possible 2020-03-19 10:25:09 +01:00
aarzilli
d1c63500e8 go.mod: remove unused dependencies, go mod tidy 2020-03-03 10:45:17 -08:00
Eli Bendersky
23b8e59ab9
service/dap: Add panic guard to DAP handlers (#1895)
* Panic guard for DAP request handling

* Use GetSeq

* Re-vendor new version of go-dap

* Remove comment

* Update error message

* Reuse er.Message in Format
2020-02-25 21:00:54 -08:00
polinasok
fbc4623c08
service/dap: Initial implementation for 'dlv dap' (#1858)
* Initial implementation for 'dlv dap'

* Fix Travis and AppVeyor failures

* Address review comments

* Address review comments

* Regenrate documentation

* Replace dap server printfs with log.Error

* Update 'dap log'

* Fix typos

* Revert logflags changes that got mixed in by accident
2020-02-15 11:52:53 -08:00
aarzilli
7e2660e7de vendor: Fix inconsistent vendoring
The ARM64 left the vendor directory in an inconsistent state, go1.13
doesn't care so we didn't catch it but go1.14 does.
2019-12-02 07:08:07 -08:00
hengwu0
1c9cfc035b test: skip failed tests on arm64
Skip the failed tests that don't work on arm64.
2019-11-27 11:07:31 -08:00
hengwu0
2a68058b4a delve: support linux-arm64 native debug(#118)
* delve now can be built to arm64-arch and running on linux-arm64 OS.
* arm64 general-purpose registers have completed.
* arm64 disasm has completed.

Co-authored-by: tykcd996 <tang.yuke@zte.com.cn>
Co-authored-by: hengwu0 <wu.heng@zte.com.cn>
2019-11-27 11:07:31 -08:00
Derek Parker
f4eaad69d9
*: Add .cirrus.yml for FreeBSD testing (#1639)
* *: Add .cirrus.yml for FreeBSD testing

* *: run go mod tidy

* service/test: prefer 127.0.0.1 over localhost

* dwarf/line: fix TestDebugLinePrologueParser

* vendor: rerun go mod vendor
2019-07-30 08:38:25 -07:00
Derek Parker
d5906ab866 *: Update starlark 2019-07-09 08:54:15 +02:00
Alessandro Arzilli
b113f0d516 vendor: update golang.org/x/sys dependency to latest version (#1600) 2019-07-03 10:36:55 -07:00
Alessandro Arzilli
ed35dce7a3 terminal: adds embedded scripting language (#1466)
If the argument of 'source' ends in '.star' it will be interpreted as a
starlark script.
If the argument of 'source' is '-' an interactive starlark repl will be
started.

For documentation on how the starlark execution environment works see
Documentation/cli/starlark.md.

The starlark API is autogenerated from the JSON-RPC API by
script/gen-starlark-bindings.go.
In general for each JSON-RPC API a single global starlark function is
created.
When one of those functions is called (through a starlark script) the
arguments are converted to go structs using reflection. See
unmarshalStarlarkValue in pkg/terminal/starbind/conv.go.
If there are no type conversion errors the JSON-RPC call is executed.
The return value of the JSON-RPC call is converted back into a starlark
value by interfaceToStarlarkValue (same file):

* primitive types (such as integers, floats or strings) are converted
  by creating the corresponding starlark value.
* compound types (such as structs and slices) are converted by wrapping
  their reflect.Value object into a type that implements the relevant
  starlark interfaces.
* api.Variables are treated specially so that their Value field can be
  of the proper type instead of always being a string.

Implements #1415, #1443
2019-07-02 10:55:27 -07:00
aarzilli
a357ce0638 tests: fix typecheckrpc.go and convert it to a test
We forgot to run typecheckrpc.go periodically and it didn't work
anymore and there were some minor errors in service/rpc2/client.go.

Rewrite typecheckrpc.go using go/packages, so that it works with go1.11
and go.mod, and fix the issues in client.go
2019-01-07 11:47:49 -08:00
Derek Parker
4927bc6c7a *: Switch to using Go modules 2018-11-07 08:44:06 +01:00