profile
viewpoint
chainhelen chainhelen China blog.hacking.pub Open source, can I help you. http://pr.hacking.pub

chainhelen/bptree 6

Implementing bplustree base on disk(kv store).

chainhelen/godbg 3

the debugger on linux platform for go (Toys ==ing==> Tool)

chainhelen/ACdream 0

programming community of ACM (node.js + express4 + mongodb)

chainhelen/c4 0

C in four functions

chainhelen/chlang 0

to be a new language interpreter

chainhelen/delve 0

Delve is a debugger for the Go programming language.

chainhelen/deno 0

A secure TypeScript runtime on V8

issue commentgo-delve/delve

Question: How to prevent the binary file __debug_bin from getting deleted when dlv exits?

dlv just use go build -o ./__debug_bin -gcflags "all=-N -l" main.go to generate binary file.

siddjain

comment created time in 2 days

issue commentgo-delve/delve

how to debug program that has stdin parameters input?

dlv debug -- --DEBUGER=true --CONFIGPATH=/Users/wwts17/Projects/manager-adapter-serv/etc/config.dev.json go run main.go

If you want read parameters from cli, should use flag of golang.

  1. Or from os env, it should be
export DEBUGER=true && export CONFIGPATH=/Users/wwts17/Projects/manager-adapter-serv/etc/config.dev.json && dlv debug
wwts17

comment created time in 5 days

issue commentgo-delve/delve

[bug-report]Failed to set variable

Not terminal. Change the launch.json accroding to Remote Debugging.

{
	"name": "Launch remote",
	"type": "go",
	"request": "launch",
	"mode": "remote",
	"remotePath": "absolute-path-to-the-file-being-debugged-on-the-remote-machine",
	"port": 2345,
	"host": "127.0.0.1",
	"program": "absolute-path-to-the-file-on-the-local-machine",
	"env": {}
}
fwhezfwhez

comment created time in 9 days

issue commentgo-delve/delve

[bug-report]Failed to set variable

No, do not copy this cmd directly. If you want to debug TestFunc, need to use

dlv test --headless --listen=:2345 --log --log-output=rpc  xxx_test.go -- test.run TestFunc
fwhezfwhez

comment created time in 9 days

Pull request review commentgo-delve/delve

*: v1.4.1

 All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning. -All changes mention the author, unless contributed by me (@derekparker).+## [1.4.1] 2020-05-22++### Added

Can we add Support linux/386 (#1884)? As I understand, this is the first time we support 32-bit os.

derekparker

comment created time in 9 days

issue commentgo-delve/delve

[bug-report]Failed to set variable

Can you use Remote Debugging on vscode ? $ dlv debug --headless --listen=:2345 --log --log-output=rpc -- -myArg=123 (Notice --log-output) Then please provide the log.

fwhezfwhez

comment created time in 10 days

pull request commentgo-delve/delve

pkg/proc: Fix crash when LocationExpr is nil

Agree, wait for more information about a small reproducer.

chainhelen

comment created time in 11 days

startedcodenotary/immudb

started time in 12 days

PR opened go-delve/delve

doc/readme: Remove the Build Status of appveyor

update #1919

+0 -1

0 comment

1 changed file

pr created time in 15 days

create barnchchainhelen/delve

branch : removeappveyor

created branch time in 15 days

push eventchainhelen/delve

colinnewell

commit sha 99a0468b9bec9adeff8078701fa1e78dee019cf2

cmd,Documentation: Add some simple examples for the list command to the help (#2034)

view details

chainhelen

commit sha 5b7d764b153e6fb0a7f52eee369c6c77041e3a16

gdbserial/gdbserver: optimize the search of debugserver binary (#2005) Unexport `GetDebugServerAbsolutePath` and avoid unnecessary repeated calls. Remove `os.Stat` because `Exec.LookPath` has already used `os.Stat`.And Fix some comments.

view details

Alessandro Arzilli

commit sha 0f83fa66f5ebc17be9349ac51951f78454a1269b

cmd/dlv: make core command limitations more prominent (#2031) Fixes #2026

view details

Alessandro Arzilli

commit sha f559c3c421dcb0777896114673f2f270a2895290

gobuild: pass-through stdout to 'go' command invocation (#2044) When trying to compile tests in a package that does not contain tests 'go' emits an error message on stdout instead of stderr. Let the 'go' command write to stdout too. Fixes #2042

view details

Anders Kaare

commit sha 71a460fc0fe578cc81dab152e3dd2515a9304da1

config: add option for printfile() line count (#2043) The option is "source-list-line-count". It defaults to 5, which was previously hardcoded in printfile(), but now you can change it dynamically, for instance: $ config source-list-line-count 20 $ list

view details

polinasok

commit sha f92afb9c17c49b0b585af4d95d84bcfc1fceef14

service/dap: Adds launch request support for program args (#2040) * Adds launch request support for program args * Combine types of function parameters Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>

view details

Alessandro Arzilli

commit sha a33be4466fda916604c638b1ceffd6bd10521f86

vendor: update logrus dependency (#2048) Fixes #2037

view details

push time in 15 days

push eventchainhelen/delve

Derek Parker

commit sha f96663a243ac3d844a3e43731d7eaf5b1bf3dfab

cmd/dlv: Fix trace output (#2038) * cmd/dlv,debugger: Improve dlv trace and trace command output This patch improves the `dlv trace` subcommand output by reducing the noise that is generated and providing clearer more concise information. Also adds new tests closing a gap in our testing (we previously never really tested this subcommand). This patch also fixes the `dlv trace` REPL command to behave like the subcommand in certain situations. If the tracepoint is for a function, we now show function arguements and return values properly. Also makes the overall output of the trace subcommand clearer. Fixes #2027

view details

Alessandro Arzilli

commit sha 200994bc8f6108cc441fdf110ddb44e0184c1fe0

proc/*: only load floating point registers when needed (#1981) Changes implementations of proc.Registers interface and the op.DwarfRegisters struct so that floating point registers can be loaded only when they are needed. Removes the floatingPoint parameter from proc.Thread.Registers. This accomplishes three things: 1. it simplifies the proc.Thread.Registers interface 2. it makes it impossible to accidentally create a broken set of saved registers or of op.DwarfRegisters by accidentally calling Registers(false) 3. it improves general performance of Delve by avoiding to load floating point registers as much as possible Floating point registers are loaded under two circumstances: 1. When the Slice method is called with floatingPoint == true 2. When the Copy method is called Benchmark before: BenchmarkConditionalBreakpoints-4 1 4327350142 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 3852642917 ns/op Updates #1549

view details

chainhelen

commit sha e28e3d30d26ab7ade78871dd7cd4a48850bc15f7

[WIP] pkg/proc: avoid target process leaks. (#2018) * pkg/proc: avoid target process leaks. Target process should exit when dlv launch failed. Fix #2017.

view details

Alessandro Arzilli

commit sha 9881edaa992e81c8a26226919247535791970ca2

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).

view details

chainhelen

commit sha 0c36bca267170461fdff1e4d6b9f84f141d6f313

pkg/proc: Fix crash when LocationExpr is nil Add nil check for v.LocationExpr Fix #2049

view details

push time in 15 days

push eventchainhelen/delve

chainhelen

commit sha 245cb280ba3b89bc80b849f0249e7ebd88acec5f

Fix: detach => Detach

view details

push time in 17 days

issue commentgo-delve/delve

Is it possible to run a single test by name?

Type 'help' for list of commands.
(dlv)

is right. It run only TestGetBulkUserData.

But then you need to type b TestGetBulkUserData and continue

jcollum

comment created time in 17 days

push eventchainhelen/delve

chainhelen

commit sha 30c7a26575bedd18af3e4ef040945f0358b276b1

Fix: add log

view details

push time in 17 days

push eventchainhelen/delve

chainhelen

commit sha 94d29d303511b6c36c929378c88025f94f1da024

Fix: not run

view details

push time in 17 days

push eventchainhelen/delve

chainhelen

commit sha b2318b0f005688b0b0a70afddda58007ac80234f

Fix: error on test

view details

push time in 17 days

push eventchainhelen/delve

chainhelen

commit sha 6a0d2d3b17f9ec563b7794e15e28eb481c70f191

Fix: dlv_test

view details

push time in 17 days

startedcoturn/coturn

started time in 17 days

push eventchainhelen/delve

chainhelen

commit sha d4a9ddbba8e470336923c7970de6410aa44a87e5

Fix: -ldflags=-w

view details

push time in 17 days

push eventchainhelen/delve

chainhelen

commit sha 1e432b55ec97489c3a4af344fee9b7495eb9eb5d

Test: the path of exe

view details

push time in 17 days

push eventchainhelen/delve

chainhelen

commit sha faa2f952d925785770c0aa807ebacca87667d398

Fix: don't skip on freebsd

view details

push time in 17 days

pull request commentgo-delve/delve

pkg/proc: avoid target process leaks.

It's a very small probability but happened about TestChildProcessExitWhenNoDebugInfo on freebsd.

I will try some times for ci to judge whether to skip on freebsd.

chainhelen

comment created time in 17 days

pull request commentgo-delve/delve

pkg/proc: avoid target process leaks.

Your new TestChildProcessExitWhenNoDebugInfo seems to fail systematically on freebsd: https://cirrus-ci.com/task/5833222820986880?command=test

Personally I'm ok with just disabling it on that GOOS.

Done

chainhelen

comment created time in 18 days

push eventchainhelen/delve

chainhelen

commit sha 2a8fa8609f9455f20afd7da5a18d1b342e9941c2

Fix: test skipped on freebsd

view details

push time in 18 days

Pull request review commentgo-delve/delve

pkg/proc: avoid target process leaks.

 func Launch(cmd []string, wd string, foreground bool, debugInfoDirs []string, tt 	dbp.childProcess = true 	_, _, err = dbp.wait(process.Process.Pid, 0) 	if err != nil {+		_ = dbp.Detach(true)

Done

chainhelen

comment created time in 19 days

issue commentgo-delve/delve

Question: Is it possible to break on unhandled exceptions in Delve?

@siddjain You can see the comments about runtime.fatalthrow() and runtime.fatalpanic() in your source code of go.

// fatalthrow implements an unrecoverable runtime throw. It freezes the
// system, prints stack traces starting from its caller, and terminates the
// process.
// fatalpanic implements an unrecoverable panic. It is like fatalthrow, except
// that if msgs != nil, fatalpanic also prints panic messages and decrements
// runningPanicDefers once main is blocked from exiting.
siddjain

comment created time in 19 days

push eventchainhelen/delve

chainhelen

commit sha ba94aedb16cbf7a516343c22cc0bea10bc4a7511

Fix: remove Detach into defer

view details

push time in 19 days

push eventchainhelen/delve

chainhelen

commit sha 988a7627ba74fa159eb5c02c26984ef4b2550be2

pkg/proc: Fix crash when LocationExpr is nil Add check for v.LocationExpr Fix #2049

view details

push time in 19 days

PR opened go-delve/delve

pkg/proc: Fix crash when LocationExpr is nil

Add check for v.LocationExpr

Fix #2049


Is it necessary to add a testcase?But how to construct such a testcase?

+3 -1

0 comment

1 changed file

pr created time in 19 days

create barnchchainhelen/delve

branch : invalidmemory

created branch time in 19 days

issue commentgo-delve/delve

Internal debugger error: runtime error: invalid memory address or nil pointer dereference.

@briandealwis Because the used version dlv is master instead of 1.4.0.

vincentjocodes

comment created time in 19 days

issue commentgo-delve/delve

Question: Is it possible to break on unhandled exceptions in Delve?

dlv has default breakpoints on exceptions.

(dlv) breakpoints
Breakpoint runtime-fatal-throw at 0x42dba0 for runtime.fatalthrow() /usr/local/go/src/runtime/panic.go:820 (0)
Breakpoint unrecovered-panic at 0x42dc10 for runtime.fatalpanic() /usr/local/go/src/runtime/panic.go:847 (0)
	print runtime.curg._panic.arg

siddjain

comment created time in 20 days

issue commentgo-delve/delve

rewind Command failed: command not available

duplicate #2036

siddjain

comment created time in 23 days

issue commentgo-delve/delve

Question: How to prevent the binary file __debug_bin from getting deleted when dlv exits?

Type dlv debug --help and see

...
      --output string   Output path for the binary. (default "./__debug_bin")
...

So you can specify --output.

siddjain

comment created time in 23 days

Pull request review commentgo-delve/delve

pkg/proc: avoid target process leaks.

 func (dbp *nativeProcess) trapWaitInternal(pid int, options trapWaitOptions) (*n 			th.os.delayedSignal = int(status.StopSignal()) 			th.os.running = false 			return th, nil-		} else {-			if err := th.resumeWithSig(int(status.StopSignal())); err != nil {-				if err == sys.ESRCH {-					dbp.postExit()-					return nil, proc.ErrProcessExited{Pid: dbp.pid}-				}-				return nil, err+		} else if err := th.resumeWithSig(int(status.StopSignal())); err != nil {

For deepsource.

chainhelen

comment created time in a month

Pull request review commentgo-delve/delve

pkg/proc: avoid target process leaks.

 func initialize(dbp *nativeProcess) error { 		} 		comm = match[1] 	}-	dbp.os.comm = strings.Replace(string(comm), "%", "%%", -1)+	dbp.os.comm = strings.ReplaceAll(string(comm), "%", "%%")

For deepsource.

chainhelen

comment created time in a month

push eventchainhelen/delve

chainhelen

commit sha 9087b923fffd1ddf7823e068ee411f020dab9123

pkg/proc: avoid target process leaks. Target process should exit when dlv launch failed. Fix #2017.

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 0dd2cd840f58744ae92d34c60b68ce39ba4804c3

Fix deepsource

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 37bee98a8821843314b561bc6ab328dfff2aad1b

pkg/config: add `disassemble-flavor` option for config Allow user to specify output syntax flavor of assembly in the disassemble command. Close #415

view details

Min Zhou

commit sha 3e04ad0fada0c3ab57caf58bc024e4c0f9a3e01a

proc: Find executable should follow symbol links. On linux platform, we simply treated `/proc/$pid/exe` as the executable of targeting process when doing `dlv attach`. The `/proc/$pid/exe` is a symbol link of the real executable file. Delve couldn't find the corrsponding external debug file based on the symbol link: ``` could not attach to pid $pid: could not open debug info ``` The fix is to evaluate the symbol links to the actual executable path.

view details

aarzilli

commit sha 6102c31d6d47a9485db150e83bd78d33465887b5

terminal: clarify Ctrl-C options with multiclient servers Fixes #2028

view details

aarzilli

commit sha bb2525a7d59be85bd5e275c1b91a2732db626dd5

proc: keep debugger state consistent if callInjectionProtocol fails pickCurrentThread should always run.

view details

aarzilli

commit sha cf37512aed935c6ce497ca14440d5c80231f0e8a

proc: move g.stackhi/g.stacklo to a struct Mirroring the way this is implemented in the Go runtime and introducing a type that will be useful to support the call injection changes in Go 1.15

view details

aarzilli

commit sha c078223d56d450f4563abe697765b29c37d22d50

proc: use cached packageVars in proc.(*EvalScope).PackageVariables

view details

aarzilli

commit sha 96890bbe1e339267daef61b46c97f1e1c6bfb374

dwarf/op: return register values when they are the only piece When there is a single piece and it's a register value just return it. This is important for clang compiled programs which will use DW_OP_regN to specify the value of the frame base.

view details

aarzilli

commit sha 8f5df19948f801fdc4404f2e2c0d8e57db521fe6

proc: fix findCompileUnitForOffset when plugins are used Splits the compileUnits slice between images so that we can search for an offset inside the debug info of a specific image file.

view details

polinasok

commit sha 2f295f310d543f0d155ca1ea9a8a1e1288afd7b6

service/dap: Add error handlers for unsupported and not-yet-supported requests (#1918) * Add no-op handlers for unsupported requests * Fix whitespace * Add couple of missing unsupported requests * More comments * Separate errors for unsupported and not-yet-implemented requests. * Fix go.mod/sum dependencies Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>

view details

chainhelen

commit sha a0839f37a532bcfd11033c36fd88e0821dea48de

pkg/proc: avoid target process leaks. Target process should exit when dlv launch failed. Fix #2017.

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 9c3904da2becca5dc84d9a02f38f73427fc12eeb

Fix: skip macos

view details

push time in a month

push eventchainhelen/godbg

push time in a month

pull request commentgo-delve/delve

pkg/proc: avoid target process leaks.

Why does this way of BuildFixture on mac say error: The specified item could not be found in the keychain.? Here is ci report.

chainhelen

comment created time in a month

push eventchainhelen/delve

chainhelen

commit sha f3547767b960bf0aacbdf25cc86d18d7c1cf06a9

Fix: deepsource

view details

push time in a month

Pull request review commentgo-delve/delve

gdbserial/gdbserver: optimize the search of debugserver binary

 func LLDBLaunch(cmd []string, wd string, foreground bool, debugInfoDirs []string 	var listener net.Listener 	var port string 	var process *exec.Cmd-	if _, err := os.Stat(GetDebugServerAbsolutePath()); err == nil {-		listener, err = net.Listen("tcp", "127.0.0.1:0")+	if debugserverExecutable := getDebugServerAbsolutePath(); debugserverExecutable != "" {+		listener, err := net.Listen("tcp", "127.0.0.1:0")

Thx, done

chainhelen

comment created time in a month

push eventchainhelen/delve

chainhelen

commit sha cb2ed26f2c837300664a7c3ec32a2e294d936656

Fix: use BuildFixture

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 08d43eaf0412e04c31f28b05cd602b909c9181a6

gdbserial/gdbserver: optimize the search of debugserver binary Unexport `GetDebugServerAbsolutePath` and avoid unnecessary repeated calls. Remove `os.Stat` because `Exec.LookPath` has already used `os.Stat`.And Fix some comments.

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 37bee98a8821843314b561bc6ab328dfff2aad1b

pkg/config: add `disassemble-flavor` option for config Allow user to specify output syntax flavor of assembly in the disassemble command. Close #415

view details

Min Zhou

commit sha 3e04ad0fada0c3ab57caf58bc024e4c0f9a3e01a

proc: Find executable should follow symbol links. On linux platform, we simply treated `/proc/$pid/exe` as the executable of targeting process when doing `dlv attach`. The `/proc/$pid/exe` is a symbol link of the real executable file. Delve couldn't find the corrsponding external debug file based on the symbol link: ``` could not attach to pid $pid: could not open debug info ``` The fix is to evaluate the symbol links to the actual executable path.

view details

aarzilli

commit sha 6102c31d6d47a9485db150e83bd78d33465887b5

terminal: clarify Ctrl-C options with multiclient servers Fixes #2028

view details

aarzilli

commit sha bb2525a7d59be85bd5e275c1b91a2732db626dd5

proc: keep debugger state consistent if callInjectionProtocol fails pickCurrentThread should always run.

view details

aarzilli

commit sha cf37512aed935c6ce497ca14440d5c80231f0e8a

proc: move g.stackhi/g.stacklo to a struct Mirroring the way this is implemented in the Go runtime and introducing a type that will be useful to support the call injection changes in Go 1.15

view details

aarzilli

commit sha c078223d56d450f4563abe697765b29c37d22d50

proc: use cached packageVars in proc.(*EvalScope).PackageVariables

view details

aarzilli

commit sha 96890bbe1e339267daef61b46c97f1e1c6bfb374

dwarf/op: return register values when they are the only piece When there is a single piece and it's a register value just return it. This is important for clang compiled programs which will use DW_OP_regN to specify the value of the frame base.

view details

aarzilli

commit sha 8f5df19948f801fdc4404f2e2c0d8e57db521fe6

proc: fix findCompileUnitForOffset when plugins are used Splits the compileUnits slice between images so that we can search for an offset inside the debug info of a specific image file.

view details

polinasok

commit sha 2f295f310d543f0d155ca1ea9a8a1e1288afd7b6

service/dap: Add error handlers for unsupported and not-yet-supported requests (#1918) * Add no-op handlers for unsupported requests * Fix whitespace * Add couple of missing unsupported requests * More comments * Separate errors for unsupported and not-yet-implemented requests. * Fix go.mod/sum dependencies Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>

view details

chainhelen

commit sha 637af675373c6eb241230a6111a3938e676e2840

gdbserial/gdbserver: optimize the search of debugserver binary Unexport `GetDebugServerAbsolutePath` and avoid unnecessary repeated calls. Remove `os.Stat` because `Exec.LookPath` has already used `os.Stat`.And Fix some comments.

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 37bee98a8821843314b561bc6ab328dfff2aad1b

pkg/config: add `disassemble-flavor` option for config Allow user to specify output syntax flavor of assembly in the disassemble command. Close #415

view details

Min Zhou

commit sha 3e04ad0fada0c3ab57caf58bc024e4c0f9a3e01a

proc: Find executable should follow symbol links. On linux platform, we simply treated `/proc/$pid/exe` as the executable of targeting process when doing `dlv attach`. The `/proc/$pid/exe` is a symbol link of the real executable file. Delve couldn't find the corrsponding external debug file based on the symbol link: ``` could not attach to pid $pid: could not open debug info ``` The fix is to evaluate the symbol links to the actual executable path.

view details

aarzilli

commit sha 6102c31d6d47a9485db150e83bd78d33465887b5

terminal: clarify Ctrl-C options with multiclient servers Fixes #2028

view details

aarzilli

commit sha bb2525a7d59be85bd5e275c1b91a2732db626dd5

proc: keep debugger state consistent if callInjectionProtocol fails pickCurrentThread should always run.

view details

aarzilli

commit sha cf37512aed935c6ce497ca14440d5c80231f0e8a

proc: move g.stackhi/g.stacklo to a struct Mirroring the way this is implemented in the Go runtime and introducing a type that will be useful to support the call injection changes in Go 1.15

view details

aarzilli

commit sha c078223d56d450f4563abe697765b29c37d22d50

proc: use cached packageVars in proc.(*EvalScope).PackageVariables

view details

aarzilli

commit sha 96890bbe1e339267daef61b46c97f1e1c6bfb374

dwarf/op: return register values when they are the only piece When there is a single piece and it's a register value just return it. This is important for clang compiled programs which will use DW_OP_regN to specify the value of the frame base.

view details

aarzilli

commit sha 8f5df19948f801fdc4404f2e2c0d8e57db521fe6

proc: fix findCompileUnitForOffset when plugins are used Splits the compileUnits slice between images so that we can search for an offset inside the debug info of a specific image file.

view details

polinasok

commit sha 2f295f310d543f0d155ca1ea9a8a1e1288afd7b6

service/dap: Add error handlers for unsupported and not-yet-supported requests (#1918) * Add no-op handlers for unsupported requests * Fix whitespace * Add couple of missing unsupported requests * More comments * Separate errors for unsupported and not-yet-implemented requests. * Fix go.mod/sum dependencies Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>

view details

push time in a month

Pull request review commentgo-delve/delve

pkg/proc: avoid target process leaks.

 func TestContinue(t *testing.T) { 	cmd.Wait() } +// TestChildProcessExitWhenNoDebugInfo verifies that the child process exits when dlv launch the binary without debug info+func TestChildProcessExitWhenNoDebugInfo(t *testing.T) {+	if _, err := exec.LookPath("ps"); err != nil {+		t.Skip("test skipped, `ps` not found")+	}++	dlvbin, tmpdir := getDlvBin(t)+	defer os.RemoveAll(tmpdir)++	// Make a (good enough) random temporary file name

OK, I will finish it tomorrow.

chainhelen

comment created time in a month

push eventchainhelen/delve

aarzilli

commit sha 9c24b56f62caffbd072e721b1edd13b1bdb3d621

proc/tests: disable TestIssue414 on linux/386/PIE This test will occasionally hang in SetBreakpoint/WriteMemory

view details

chainhelen

commit sha 5e7532ff425d7d0522a77b18980283336045eb62

gdbserial/gdbserver: optimize the search of debugserver binary Unexport `GetDebugServerAbsolutePath` and avoid unnecessary repeated calls. Remove `os.Stat` because `Exec.LookPath` has already used `os.Stat`.And Fix some comments.

view details

push time in a month

push eventchainhelen/delve

aarzilli

commit sha 9c24b56f62caffbd072e721b1edd13b1bdb3d621

proc/tests: disable TestIssue414 on linux/386/PIE This test will occasionally hang in SetBreakpoint/WriteMemory

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 3147ad90c6424d057d1cfa74fe0421d041726594

Fix: travis_ci

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 63890473d2a6888d2d17ca17cea9467d99cbebb6

pkg/proc: avoid target process leaks. Target process should exit when dlv launch failed. Fix #2017.

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha e4283588a56f15d6cc46b92ce6f498b76418cf1f

Feture: add test case

view details

chainhelen

commit sha cc1bb89c44d3ec60ab400f46cf42aa5cf079638e

Feature: change `run` into `start`

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha f318e84201d9886c150940e5f9a283ec7563b65d

Fix: fix deepsource

view details

push time in a month

push eventchainhelen/delve

aarzilli

commit sha 9c24b56f62caffbd072e721b1edd13b1bdb3d621

proc/tests: disable TestIssue414 on linux/386/PIE This test will occasionally hang in SetBreakpoint/WriteMemory

view details

chainhelen

commit sha f3f6eea37dcd890561721f3f1e26a0b97c33f93c

pkg/proc: avoid target process leaks. Target process should exit when dlv launch failed. Fix #2017.

view details

push time in a month

pull request commentgo-delve/delve

pkg/proc: avoid target process leaks.

Ok, good idea, I will try.

chainhelen

comment created time in a month

pull request commentgo-delve/delve

pkg/proc: avoid target process leaks.

It looks child process doesn't immediately receive kill signal from os. I don't konw why.

It could be because it's trace stopped. Doing it by launching another instance of dlv, like the tests in cmd/dlv/dlv_test.go do, might work.

Oh, yes. Thx for guidance, I will try.

chainhelen

comment created time in a month

pull request commentgo-delve/delve

pkg/proc: avoid target process leaks.

@derekparker @aarzilli I am sure this logic take effect, but I don't know how to add this case.

Because there is a issue about here.

func Launch(cmd []string, wd string, foreground bool, debugInfoDirs []string, tty string) (*proc.Target, error) {
	defer func() {
		if err != nil && dbp != nil && dbp.pid != 0 {
			_ = killProcess(dbp.pid)
		}
	}()
}

Child process doesn't exit directly after killProcess until parent exit. It looks child process doesn't immediately receive kill signal from os. I don't konw why.

chainhelen

comment created time in a month

pull request commentgo-delve/delve

pkg/proc: avoid target process leaks.

@dlsniper Yes, as aarzilli say , just exec not attach.

chainhelen

comment created time in a month

push eventchainhelen/delve

chainhelen

commit sha 8f1a59e79964f85c7905d033a73c096df3364885

Feature: fix deepsource

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 54c590c91ab0fcd203251d0c6583b6bbe5e28643

Feature: the same as windows

view details

push time in a month

pull request commentgo-delve/delve

pkg/config: add `disassemble-flavor` option for config

Thx, done and reabse.

chainhelen

comment created time in a month

push eventchainhelen/delve

Alessandro Arzilli

commit sha 223e0a57ca7311e8ef533d1cef31b5ebf8b9dcf9

proc: convert Arch into a struct (#1972) Replace the interface type Arch with a struct with the same functionality.

view details

aarzilli

commit sha 431dea7ee6593377b75dfba09951b922848b7812

proc: skip autogenerated wrappers when stepping in and out Under some circumstances (methods with non-pointer receivers or from embedded fields called through an interface) the compiler will autogenerate wrapper functions. This commit changes next, step and stepout to skip all autogenerated wrappers. Fixes #1908

view details

aarzilli

commit sha a61b6c0d7cfddbf6c17d2b237251c2d95c25a3d9

proc: avoid constructing unnecessary strings when evaluating variables Avoids constructing: 1. name of runtime.curg fields while executing parseG 2. the location expression while evaluating any variable. Benchmark before: BenchmarkConditionalBreakpoints-4 1 4953889884 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 4419775128 ns/op Updates #1549

view details

aarzilli

commit sha 1ee8d5c218761b3e8c84358f4afe62ec94ed932b

tests: relax TestStacktraceGoroutine with Go 1.14 The test was always flaky because we can't fully control the state of all goroutines in the target program, Go 1.14's asynchronous preemption exacerbates the problem. See for example: https://travis-ci.com/github/go-delve/delve/jobs/302407282 This commit relaxes the checks made by the test to avoid irrelevante flakiness.

view details

aarzilli

commit sha 3c8d4d52b825e313f21824da63c0904ba2ebb76e

*: un-export unnecessarily public symbols

view details

Derek Parker

commit sha 3cf685e5ea5b4b9bac6ab57abb5b5e4e69231804

cmd/dlv: Unexport flag variables

view details

polinasok

commit sha c97c04220daa9fea5cfcbac3ba3cf67daf5ed8f5

service/dap: Change reason to "entry" when stopping on entry (#1976) Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>

view details

aarzilli

commit sha 72eeb5ae844044ba9239a2da74421feddbe41d9e

debugger: ClearBreakpoint should clear a logical breakpoint Clear all physical breakpoints associated with a logical breakpoint in ClearBreakpoint. Fixes #1955

view details

Derek Parker

commit sha aa0b4eb180124c68a5dbd5389d6d30734735129d

*: Better error launching invalid binary format Fixes #1310

view details

Lukas Spieß

commit sha eac6ebed036980909dfa234838883bf7372d5be0

Use proper spelling of Xcode (#1984)

view details

aarzilli

commit sha 7dedf1ed558ec37a462af3675eb6d65eb6d4dc1e

proc: simplify next/step/stepout condition code Adds a library of utility functions to generated breakpoint conditions for next, step and stepout.

view details

aarzilli

commit sha 3a72646782ea0c39946b12b214933027afd7c615

Documentation: add modules mode note to install documentation 1. Adds a note to the documentation describing how to use 'go get' in modules mode 2. Removes the '-u' option which, when 'go get' is used incorrectly will make 'go' try to compile Delve with unsupported dependencies 3. Removed obsolete note about Go 1.5 vendor experiment. Fixes #1988

view details

Derek Parker

commit sha 0c9846c0a4fc994e1237b75b6d51b60f5694f8ae

*: Update freebsd image

view details

Darren Rambaud

commit sha bc30b53926f85c03c0e4175910da4bb928f4b999

gdbserial/gdbserver: Dynamically resolve debugserver binary (#1994) * gdbserial/gdbserver: Dynamically resolve debugserver binary Instead of hardcoding the absolute path to the Command Line Tools (CLT) binary, will attempt to resolve the path at the $PATH, or at the Xcode bundle. If none are available, will fallback to the default CLT location. Fixes #986 * gdbserial/gdbserver: Log outgoing executed commands Add logging to capture the executable and associated arguments used in LLDBLaunch and LLDBAttach Related to #986 * gdbserial/gdbserver: Add unit tests for helper function Define unit tests for helper function. Setup each test to temporarily make PATH variable, and file system changes, and subsequently revert them. Related to #986 * gdbserial/gdbserver: Lazily load function Lazily obtain absolute path to avoid increasing load times. Remove flaky tests. Related to #986

view details

Alessandro Arzilli

commit sha c3a4d726e21d75ffd7c0907b85e428480a9ad9a1

Miscellaneous debug_line improvements (#1999) * dwarf/line: implement DW_LNE_set_discriminator We don't use the discriminator field in any way but we need to at least parse it to support debub_line programs that use it. * dwarf/line: support parsing DWARF4 debug_line sections There is an extra field maximum_operations_per_instruction that is used for VLIW CPUs. We don't support this feature but we have to at least parse the field to not crash.

view details

Derek Parker

commit sha 3e60ae202b7d7c67fe7ea5fffafc92c7e39e4b67

*: 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.

view details

Derek Parker

commit sha 00aab8d6902d2bc24550ed598ecfc63d04bb5a44

vendor: Update vendor

view details

Darren Rambaud

commit sha b13fe990bdcc7eec790514f2065b1c7f011371c0

cmds/commands: Add --continue flag to attach Add --continue as a valid flag for the attach command by decorating attachCommand with the continueOnStart variable. Fixes #1995

view details

Darren Rambaud

commit sha 49c6498512d18ef4fd4e3a9356a743fcee77fec0

cmd/commands: Update documentation for dlv attach Commit changes after executing gen-usage-docs.go script Related to #1995

view details

aarzilli

commit sha ae846a51f22758e8ce1461982b4376c8c0ab41c7

proc: StepOut remove if condition that is always true

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 8911fbdea4fc23790d1020393efa8fd370bcc98a

gdbserial/gdbserver: optimize the search of debugserver binary Unexport `GetDebugServerAbsolutePath` and avoid unnecessary repeated calls. Remove `os.Stat` because `Exec.LookPath` has already used `os.Stat`.And Fix some comments.

view details

push time in a month

issue commentgo-delve/delve

No support exit dlv

dlsniper: @liangjingkanji please provide steps to reproduce the issue. Also, the question is not related to the current one, please open a new one. If you want to chat, there's a #goland channel on Gophers Slack https://invite.slack.golangbridge.org/. And if it's a question for GoLand, please use our tracker first, https://youtrack.jetbrains.com/issues/Go. We'll forward anything we need to this tracker.

@liangjingkanji I think you can follow those steps and this issue can be closed.

liangjingkanji

comment created time in a month

pull request commentgo-delve/delve

pkg/config: add `disassemble-flavor` option for config

En, will this pr be merged or closed?

chainhelen

comment created time in a month

push eventchainhelen/delve

chainhelen

commit sha ad9d13c6719e9f5e2a68a6f9078860ba75add146

proc: Don't set fileFound if there's a compileUnit without line section (#2006) We should not return error directly which set `fileFound` to be true if there's a compileUnit without line section.

view details

Derek Parker

commit sha e5d24a96bf2e6f5672b655a55184a8d9f5490a4a

*: Consolidate service/debugger config Embed the debugger config object in the service config object to avoid needless duplication of fields.

view details

Derek Parker

commit sha c06a1a0252ee164a4a775c587396945ab771c498

service/debugger: Fix checking for CI

view details

Alessandro Arzilli

commit sha bc299a7a30e34996bce67eb2b0145fdcb507e49d

tests: properly check if cgo is enabled for cgo related tests (#2010)

view details

Derek Parker

commit sha 682ee7ffd0da1e3f794b710d77340413c04d40ad

service/debugger: Rename processMutex to targetMutex Fixes a long standing dangling TODO item.

view details

aarzilli

commit sha 55543e2570f2ac2b489f181ac9e8d8b158d0f6e7

Makefile: reduce test timeout when TRAVIS==true Reduces test timeout by one minute so that Go will timeout before Travis-CI and report useful informations about the hang.

view details

aarzilli

commit sha f9b6c43910fbc7e49e46a96cd53a4261e4498b16

proc/native: report trapWaitInternal errors in nativeProcess.stop The process could quit while we are inside stop, we should report the error otherwise the following code will try to send on the closed ptrace channel. Fixes a sporadic error in TestIssue1101.

view details

chainhelen

commit sha 0e62ab0206216e43730f40be6316d802d6933a0c

gdbserial/gdbserver: optimize the search of debugserver binary Unexport `GetDebugServerAbsolutePath` and avoid unnecessary repeated calls. Remove `os.Stat` because `Exec.LookPath` has already used `os.Stat`.And Fix some comments.

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 9822558c1b2493eff0702a8b7488f8007f0e98a6

remove unused code

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 8c81359381c8a84b0c3d039cc6aa17b9e0061bee

pkg/proc: avoid target process leaks. Target process should exit when dlv launch failed. Fix #2017.

view details

push time in a month

push eventchainhelen/delve

chainhelen

commit sha 7260ce93ce0e136585ff2dae70a1951e5f770ff7

CI: unused code

view details

push time in a month

pull request commentgo-delve/delve

gdbserial/gdbserver: optimize the search of debugserver binary

Ok, I want to try to test failed CI for this pr. So don't merge temporarily.

chainhelen

comment created time in a month

PR opened go-delve/delve

pkg/proc: avoid target process leaks.

Target process should exit when dlv launch failed.

Fix #2017.

+36 -10

0 comment

3 changed files

pr created time in a month

create barnchchainhelen/delve

branch : process_leaks

created branch time in a month

push eventchainhelen/delve

chainhelen

commit sha ad9d13c6719e9f5e2a68a6f9078860ba75add146

proc: Don't set fileFound if there's a compileUnit without line section (#2006) We should not return error directly which set `fileFound` to be true if there's a compileUnit without line section.

view details

Derek Parker

commit sha e5d24a96bf2e6f5672b655a55184a8d9f5490a4a

*: Consolidate service/debugger config Embed the debugger config object in the service config object to avoid needless duplication of fields.

view details

Derek Parker

commit sha c06a1a0252ee164a4a775c587396945ab771c498

service/debugger: Fix checking for CI

view details

Alessandro Arzilli

commit sha bc299a7a30e34996bce67eb2b0145fdcb507e49d

tests: properly check if cgo is enabled for cgo related tests (#2010)

view details

Derek Parker

commit sha 682ee7ffd0da1e3f794b710d77340413c04d40ad

service/debugger: Rename processMutex to targetMutex Fixes a long standing dangling TODO item.

view details

aarzilli

commit sha 55543e2570f2ac2b489f181ac9e8d8b158d0f6e7

Makefile: reduce test timeout when TRAVIS==true Reduces test timeout by one minute so that Go will timeout before Travis-CI and report useful informations about the hang.

view details

aarzilli

commit sha f9b6c43910fbc7e49e46a96cd53a4261e4498b16

proc/native: report trapWaitInternal errors in nativeProcess.stop The process could quit while we are inside stop, we should report the error otherwise the following code will try to send on the closed ptrace channel. Fixes a sporadic error in TestIssue1101.

view details

push time in a month

issue commentgo-delve/delve

`dlv exec` leave target process running that was not successfully launch caused by missing debug info

@qingyunha Whether this stripped binary runs directly is also a dead cycle?(for example, listen tcp port)

qingyunha

comment created time in a month

pull request commentgo-delve/delve

gdbserial/gdbserver: optimize the search of debugserver binary

Ha ha, so fortunate again.

chainhelen

comment created time in 2 months

Pull request review commentgo-delve/delve

*: Consolidate service/debugger config

 func (s *Server) onLaunchRequest(request *dap.LaunchRequest) { 	}  	stop, ok := request.Arguments["stopOnEntry"]-	s.stopOnEntry = (ok && stop == true)+	s.stopOnEntry = ok && stop == true  	// TODO(polina): support target args 	s.config.ProcessArgs = []string{program}-	s.config.WorkingDir = filepath.Dir(program)--	config := &debugger.Config{-		WorkingDir:           s.config.WorkingDir,-		AttachPid:            0,-		CoreFile:             "",-		Backend:              s.config.Backend,-		Foreground:           s.config.Foreground,-		DebugInfoDirectories: s.config.DebugInfoDirectories,-		CheckGoVersion:       s.config.CheckGoVersion,-		TTY:                  s.config.TTY,-	}+	s.config.Debugger.WorkingDir = filepath.Dir(program)++	config := s.config.Debugger 	var err error-	if s.debugger, err = debugger.New(config, s.config.ProcessArgs); err != nil {+	if s.debugger, err = debugger.New(&config, s.config.ProcessArgs); err != nil {

En, maybe we can remove temporary variable config and

debugger.New(&s.config.Debugger, s.config.ProcessArgs)

is enough.

derekparker

comment created time in 2 months

push eventchainhelen/delve

chainhelen

commit sha e15807f05f2a2e5574457c94844d3066e68a801e

proc: Don't set fileFound if there's a compileUnit without line section We should not return error directly which set `fileFound` to be true if there's a compileUnit without line section.

view details

push time in 2 months

pull request commentgo-delve/delve

scripts/make: do not test buildmode=pie on linux/386

@derekparker I think it is more likely to be an problem with travis ci itself. (Based on my tests above) .

https://travis-ci.com/github/go-delve/delve/jobs/318730386 again. I approved of this pr because i also have no a better idea.

aarzilli

comment created time in 2 months

pull request commentgo-delve/delve

gdbserial/gdbserver: optimize the search of debugserver binary

To be on the safe side, can you help me re-run ci for travis? thx.

chainhelen

comment created time in 2 months

PR opened go-delve/delve

pkg: fix the logic of error about `fileFound`

In my opinion, we should not return error directly which set fileFound to be true if lineInfo of one compileUnits is nil.

+1 -1

0 comment

1 changed file

pr created time in 2 months

create barnchchainhelen/delve

branch : LineToPC

created branch time in 2 months

PR opened golang/go

doc/debugging_with_gdb: fix the link of delve

The repository of delve has already switched from the personal account github.com/derekparker/delve to the organization account github.com/go-delve/delve. According to go-delve/delve#1456.

+2 -2

0 comment

1 changed file

pr created time in 2 months

push eventchainhelen/go

chainhelen

commit sha f90120c3b33f2134a572a62aaf291aa2abe58749

doc/debugging_with_gdb: fix the link of delve The repository of delve has already switched from the personal account github.com/derekparker/delve to the organization account github.com/go-delve/delve. According to go-delve/delve#1456.

view details

push time in 2 months

create barnchchainhelen/go

branch : delve_url

created branch time in 2 months

push eventchainhelen/go

Jeremy Faller

commit sha b4245ea54432bcdc92dc5e0e84b07408f5ee5479

[dev.link] cmd/link: use mmapped data for macho host objs Move all the reads from macho host objects to mmapped data. Change-Id: I9904f148feab6ef972d814a93964bcad04207b13 Reviewed-on: https://go-review.googlesource.com/c/go/+/205841 Run-TryBot: Jeremy Faller <jeremy@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>

view details

Than McIntosh

commit sha 17722c21e754f25b7694b350cdae044b9729776c

[dev.link] cmd/link/internal/loader: reduce ABI alias postprocessing overhead In loadObjFull when populating the sym.Reloc vector for live symbols, avoid using the loader.SymType() method to determine if a relocation targets an ABI alias; since invoking loader.SymType requires a global-to-local index translation and a read from the object file. Instead just look at the target symbol itself, which has already been created at this point. Hyperkube performance numbers for this change: name old time/op new time/op delta RelinkHyperkube 29.9s ± 2% 29.2s ± 3% -2.42% (p=0.000 n=20+20) RelinkWithoutDebugHyperkube 22.0s ± 3% 21.4s ± 3% -2.58% (p=0.000 n=20+20) Change-Id: Ib7696d8760dd0485240246d6d640668fbf451d71 Reviewed-on: https://go-review.googlesource.com/c/go/+/205257 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>

view details

Cherry Zhang

commit sha 7cd858cbcb06c5d2ee821901a31f7acb6b8898cf

[dev.link] all: merge branch 'master' into dev.link Clean merge. Change-Id: Id03e6f00790ad52e0202111bbbc35f5c05567427

view details

Cherry Zhang

commit sha 8cdb769b082a57f95b398a1f345c60f632ff5476

[dev.link] cmd: reenable newobj mode by default Change-Id: I6e820a77c516363f350c2aad5bc17a2d7e7501e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/206457 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>

view details

Jeremy Faller

commit sha aacffb65767d107f6b37235f6a6def22bcf962cb

[dev.link] cmd/link: remove old objs from host obj loaders Change-Id: I9ee853e37090ea015aba817d9aeb2f4cc9ff5a1b Reviewed-on: https://go-review.googlesource.com/c/go/+/206539 Run-TryBot: Jeremy Faller <jeremy@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>

view details

Cherry Zhang

commit sha 181faef82c640c82d88826cddb28a92fc318dfc7

[dev.link] cmd/compile, cmd/asm: delete old object file format support There are more cleanups to do, but I want to keep this CL mostly a pure deletion. Change-Id: Icd2ff0a4b648eb4adf3d29386542617e49620818 Reviewed-on: https://go-review.googlesource.com/c/go/+/206398 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>

view details

Cherry Zhang

commit sha 62dfb278279575715010fdce346f39a2072b73dd

[dev.link] cmd/link: delete old object file format support There are more cleanups to do, but I want to keep this CL mostly a pure deletion. Change-Id: I30f4891a2ea54545fd6b83041746ab65895537e1 Reviewed-on: https://go-review.googlesource.com/c/go/+/206558 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>

view details

Cherry Zhang

commit sha 27c0aeee3fc7ed35f9b2eac4725b9147902537da

[dev.link] all: merge branch 'master' into dev.link Clean merge. Change-Id: I4a73cd4bac2f4d35d2c07c39f2bc01c6075fadab

view details

Cherry Zhang

commit sha f7672d39ca9eeb05d0605348290335698da98ae8

[dev.link] all: merge branch 'master' into dev.link Bring in Than's fix of #35779. The only merge conflict is cmd/link/internal/loadelf/ldelf.go, with a modification-deletion conflict. Change-Id: Id2fcfd2094a31120966a6ea9c462b4ec76646b10

view details

Than McIntosh

commit sha 29f886e427c1686fd79fc4c4052b22634a5b13d8

[dev.link] cmd/link: avoid allsyms loop in initarray setup In the linker's symtab() function, avoid looping over the context's Syms.Allsyms array to locate the entry symbol when setting up the init array section; do an explicit ABI0 symbol lookup instead. This is a minor efficiency tweak / code cleanup. Fixes #20205. Change-Id: I2ebc17a3cb2cd63e9f5052bc80f1b0ac72c960e3 Reviewed-on: https://go-review.googlesource.com/c/go/+/209838 Run-TryBot: Than McIntosh <thanm@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>

view details

Jeremy Faller

commit sha 664accc7be901bca737ff8d01377adf36704eb27

[dev.link] cmd/link: remove sym.Symbols from loader Pushing the wavefront forward requires a single source of truth for symbols. This CL removes sym.Symbols from the loader for host object loaders, allowing us to have the single source of truth for symbols be the loader, not some strange combination of sym.Symbols and the loader. Change-Id: Ib8ff0117ebe6040fade346047535ff342d781081 Reviewed-on: https://go-review.googlesource.com/c/go/+/209217 Run-TryBot: Jeremy Faller <jeremy@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>

view details

Than McIntosh

commit sha 07914eda407a6197dc628fb20cf7d9b57b943518

[dev.link] cmd/link: initial support for linker-materialized external symbols Create loader infrastructure for constructing the payloads of external symbols from scratch, as opposed to passing in a sym.Symbol object containing the payload. The general idea is that clients can use the loader to create new external Sym's using loader.AddExtSym, and then can add relocations/data to the new sym with symbol builder interfaces (to be provided in an subsequent patch), as opposed to having to use sym.Symbol. This change preserves compatibility with the old way of doing things (passing in sym.Symbol) via a new loader.InstallSym method. If a client invokes this method for a specific Sym, then the loader keeps track of this fact and uses the sym.Symbol as the backing store instead. Also included is a small unit test for the new interfaces -- not clear whether this really needs to be kept around long term... it was mainly useful during initial bringup. Change-Id: If8ab15df7b64636e56b317155dfe6d7cdfe23b71 Reviewed-on: https://go-review.googlesource.com/c/go/+/207606 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>

view details

Than McIntosh

commit sha b658c62e9c5861f8c2bcc6323572998ef5ee0567

[dev.link] cmd/link: expand set of symbol attributes in loader Add in a collection of new loader interfaces for getting/setting symbol attributes, e.g. properties that would normally be part of the sym.Symbol "Attr" field. This change also moves references to the loaders 'reachable' bitmap behind a pair of loader methods, so that we a consistent way of accessing symbol attributes overall. It is worth noting that not every symbol attribute is backed by a bitmap; for some infrequently used attributes, a map[Sym]struct{} is used instead. Change-Id: I0010c9cd928d41b4bb6cdf45db4581e11c3c5db3 Reviewed-on: https://go-review.googlesource.com/c/go/+/210778 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>

view details

Than McIntosh

commit sha e6b044b20040f76a5602a7fe6fc3d6e994376df1

[dev.link] cmd/link: add storage and methods for read/write of Sym value Add loader methods SymValue() and SetSymValue() to get/set the value of a symbol by global index. Change-Id: Ifc71480fc34c719ad00506d0828edf36c1a57119 Reviewed-on: https://go-review.googlesource.com/c/go/+/211302 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>

view details

Than McIntosh

commit sha 66c74b78caf1628f058bf92ccf13c1f2b4054cfd

[dev.link] cmd/link: support marking outer/sub for external loader.Sym Add a loader mechanism for recording outer/sub relationships between symbols without falling back on sym.Symbol. Also includes a new "PrependSub" method that provides a way to chain a sub-symbol only the list of an outer symbol (a common operation when manipulating outer/sub relationships in the linker). Change-Id: I70c72356945ceec2bacdcdc25bcc352bfb6765a1 Reviewed-on: https://go-review.googlesource.com/c/go/+/210777 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>

view details

Than McIntosh

commit sha 3c3ba97ba5e0f0a9b8455d53e2790851c6ba0c7b

[dev.link] cmd/link: add loader method to sort sub-symbols of outer symbol Add a new loader method SymSortSub that sorts the sub-symbols of a given outer symbol (designed to be compatible with the existing sym.Symbol method). Change-Id: Icd6627b2e6d04524d657e712cfd39fda0e0e080b Reviewed-on: https://go-review.googlesource.com/c/go/+/211297 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>

view details

Than McIntosh

commit sha 24f9b9c8f3042f128d59c27d461cc34ddc3ab5d3

[dev.link] cmd/link: record external symbol alignment Add a mechanism for recording symbol alignment for external symbols under the new loader scheme. Alignments is stored in a side table, since most symbols don't wind up needing an alignment other than zero. Change-Id: I97092481412c15eac9b9f4c29b5c273f53759562 Reviewed-on: https://go-review.googlesource.com/c/go/+/210177 Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>

view details

Than McIntosh

commit sha e4a8da499b0d5aa235abaddb09793546ba6b7446

[dev.link] cmd/link: add dynimp, localentry attributes for loader.Sym Add new methods to get/set the "dynimplib", "dynimpvers" and "localentry" attributes for an external Sym in loader.Loader. These attribute values are stored sparsely, since we expect that most symbols will not need them; they are set when processing cgo directives and when dealing with host object symbols. Change-Id: If0b3c173307801d39cb576bb99c83b9081c42d9c Reviewed-on: https://go-review.googlesource.com/c/go/+/211298 Reviewed-by: Jeremy Faller <jeremy@golang.org>

view details

Than McIntosh

commit sha 9a5468edff1b0f8e3b6be02ed59b238679cf5c2f

[dev.link] cmd/link: fix some bugs in loader This patch fixes a couple of bugs introduced in CL 210778 and CL 207606: - apply the same version selection scheme in loader.CreateExtSym that we're currently using for loader.Create (since the two functions will be used in the same way by the host object loader) - add code to the loader's NewLoader function to create initial map values for some of the map-based symbol attributes (somewhere along the line the code to do this seems to have gotten lost, so this patch adds it back). - fix a coding error in growAttrBitmaps (wrong bitmap passed to append when extending attrOnList) Change-Id: Ie0c8c6876428bb21d788c19a7a2db945ac649fac Reviewed-on: https://go-review.googlesource.com/c/go/+/212097 Reviewed-by: Jeremy Faller <jeremy@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>

view details

Than McIntosh

commit sha c6fea80b9582d7c4f86bf88b404ac6ebb33359fd

[dev.link] cmd/link: add SymVersion loader method Add a loader method to retrieve the version from a loader.Sym (useful mainly for debugging at the moment). Change-Id: I82e0e316bb86eb41b9cf366e656a0f848cf3424e Reviewed-on: https://go-review.googlesource.com/c/go/+/212617 Reviewed-by: Jeremy Faller <jeremy@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>

view details

push time in 2 months

PR opened go-delve/delve

gdbserial/gdbserver: optimize the search of debugserver binary

Unexport GetDebugServerAbsolutePath and avoid unnecessary repeated calls. Remove os.Stat because Exec.LookPath has already used os.Stat.And Fix some comments.

+24 -26

0 comment

1 changed file

pr created time in 2 months

create barnchchainhelen/delve

branch : optimize

created branch time in 2 months

push eventchainhelen/delve

Alessandro Arzilli

commit sha 223e0a57ca7311e8ef533d1cef31b5ebf8b9dcf9

proc: convert Arch into a struct (#1972) Replace the interface type Arch with a struct with the same functionality.

view details

aarzilli

commit sha 431dea7ee6593377b75dfba09951b922848b7812

proc: skip autogenerated wrappers when stepping in and out Under some circumstances (methods with non-pointer receivers or from embedded fields called through an interface) the compiler will autogenerate wrapper functions. This commit changes next, step and stepout to skip all autogenerated wrappers. Fixes #1908

view details

aarzilli

commit sha a61b6c0d7cfddbf6c17d2b237251c2d95c25a3d9

proc: avoid constructing unnecessary strings when evaluating variables Avoids constructing: 1. name of runtime.curg fields while executing parseG 2. the location expression while evaluating any variable. Benchmark before: BenchmarkConditionalBreakpoints-4 1 4953889884 ns/op Benchmark after: BenchmarkConditionalBreakpoints-4 1 4419775128 ns/op Updates #1549

view details

aarzilli

commit sha 1ee8d5c218761b3e8c84358f4afe62ec94ed932b

tests: relax TestStacktraceGoroutine with Go 1.14 The test was always flaky because we can't fully control the state of all goroutines in the target program, Go 1.14's asynchronous preemption exacerbates the problem. See for example: https://travis-ci.com/github/go-delve/delve/jobs/302407282 This commit relaxes the checks made by the test to avoid irrelevante flakiness.

view details

aarzilli

commit sha 3c8d4d52b825e313f21824da63c0904ba2ebb76e

*: un-export unnecessarily public symbols

view details

Derek Parker

commit sha 3cf685e5ea5b4b9bac6ab57abb5b5e4e69231804

cmd/dlv: Unexport flag variables

view details

polinasok

commit sha c97c04220daa9fea5cfcbac3ba3cf67daf5ed8f5

service/dap: Change reason to "entry" when stopping on entry (#1976) Co-authored-by: Polina Sokolova <polinasok@users.noreply.github.com>

view details

aarzilli

commit sha 72eeb5ae844044ba9239a2da74421feddbe41d9e

debugger: ClearBreakpoint should clear a logical breakpoint Clear all physical breakpoints associated with a logical breakpoint in ClearBreakpoint. Fixes #1955

view details

Derek Parker

commit sha aa0b4eb180124c68a5dbd5389d6d30734735129d

*: Better error launching invalid binary format Fixes #1310

view details

Lukas Spieß

commit sha eac6ebed036980909dfa234838883bf7372d5be0

Use proper spelling of Xcode (#1984)

view details

aarzilli

commit sha 7dedf1ed558ec37a462af3675eb6d65eb6d4dc1e

proc: simplify next/step/stepout condition code Adds a library of utility functions to generated breakpoint conditions for next, step and stepout.

view details

aarzilli

commit sha 3a72646782ea0c39946b12b214933027afd7c615

Documentation: add modules mode note to install documentation 1. Adds a note to the documentation describing how to use 'go get' in modules mode 2. Removes the '-u' option which, when 'go get' is used incorrectly will make 'go' try to compile Delve with unsupported dependencies 3. Removed obsolete note about Go 1.5 vendor experiment. Fixes #1988

view details

Derek Parker

commit sha 0c9846c0a4fc994e1237b75b6d51b60f5694f8ae

*: Update freebsd image

view details

Darren Rambaud

commit sha bc30b53926f85c03c0e4175910da4bb928f4b999

gdbserial/gdbserver: Dynamically resolve debugserver binary (#1994) * gdbserial/gdbserver: Dynamically resolve debugserver binary Instead of hardcoding the absolute path to the Command Line Tools (CLT) binary, will attempt to resolve the path at the $PATH, or at the Xcode bundle. If none are available, will fallback to the default CLT location. Fixes #986 * gdbserial/gdbserver: Log outgoing executed commands Add logging to capture the executable and associated arguments used in LLDBLaunch and LLDBAttach Related to #986 * gdbserial/gdbserver: Add unit tests for helper function Define unit tests for helper function. Setup each test to temporarily make PATH variable, and file system changes, and subsequently revert them. Related to #986 * gdbserial/gdbserver: Lazily load function Lazily obtain absolute path to avoid increasing load times. Remove flaky tests. Related to #986

view details

Alessandro Arzilli

commit sha c3a4d726e21d75ffd7c0907b85e428480a9ad9a1

Miscellaneous debug_line improvements (#1999) * dwarf/line: implement DW_LNE_set_discriminator We don't use the discriminator field in any way but we need to at least parse it to support debub_line programs that use it. * dwarf/line: support parsing DWARF4 debug_line sections There is an extra field maximum_operations_per_instruction that is used for VLIW CPUs. We don't support this feature but we have to at least parse the field to not crash.

view details

Derek Parker

commit sha 3e60ae202b7d7c67fe7ea5fffafc92c7e39e4b67

*: 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.

view details

Derek Parker

commit sha 00aab8d6902d2bc24550ed598ecfc63d04bb5a44

vendor: Update vendor

view details

Darren Rambaud

commit sha b13fe990bdcc7eec790514f2065b1c7f011371c0

cmds/commands: Add --continue flag to attach Add --continue as a valid flag for the attach command by decorating attachCommand with the continueOnStart variable. Fixes #1995

view details

Darren Rambaud

commit sha 49c6498512d18ef4fd4e3a9356a743fcee77fec0

cmd/commands: Update documentation for dlv attach Commit changes after executing gen-usage-docs.go script Related to #1995

view details

aarzilli

commit sha ae846a51f22758e8ce1461982b4376c8c0ab41c7

proc: StepOut remove if condition that is always true

view details

push time in 2 months

pull request commentgo-delve/delve

scripts/make: do not test buildmode=pie on linux/386

[ubuntu] I build i386 ubuntu (2 core cpu) by virtulbox, script never hang.

[centos] 1.The installation of centos i386 (http://mirror.aktkn.sg/centos-altarch/7.7.1908/isos/i386/CentOS-7-i386-Everything-1908.iso) with multicore cpu always failed by virtulbox. I don't know why. 2. centos i386 with single core never hang.

And I see this ci case of amd64 has also hung.

aarzilli

comment created time in 2 months

issue commentgo-delve/delve

can't install dlv

You can set export GO111MODULE=off before go get temporarily. The final solution requires code changes.

mojo-zd

comment created time in 2 months

issue commentgo-delve/delve

can't install dlv

Same as #1988

mojo-zd

comment created time in 2 months

issue commentgo-delve/delve

No support exit dlv

You should dlv connect 192.168.8.134:2345 and type quit for exit When --headless. ( kill is also ok)

I have try the Latest GoLand, it seems that GoLand's support for Go Remoteis not friendly enough. Any idea? @dlsniper

liangjingkanji

comment created time in 2 months

issue commentgo-delve/delve

Failure to read stdin on programs run under dlv.

Need to use --headless mode

Run server and client respectively on two terminals.

// server
dlv debug main.go --headless --listen 127.0.0.1:3100

// client 
 dlv connect 127.0.1:3100 
ianbruene

comment created time in 2 months

pull request commentgo-delve/delve

Only load floating point registers when needed [WIP]

En, about

Benchmark before:

BenchmarkConditionalBreakpoints-4   	       1	4327350142 ns/op

Benchmark after:

BenchmarkConditionalBreakpoints-4   	       1	3852642917 ns/op

When I do benchmark (previous similar optimizations), the fluctuation is very big every time and the value is inconspicuous. Of course it must be optimized in theory.

I just want to konw how to generate reliable data. Maybe remove the maximum, remove the minimum, take the average?

aarzilli

comment created time in 2 months

pull request commentgo-delve/delve

scripts/make: do not test buildmode=pie on linux/386

1. Not one cpu, in my local docker

// top
%Cpu0  :  3.9 us,  0.0 sy,  0.0 ni, 95.1 id,  0.0 wa,  0.0 hi,  1.0 si,  0.0 st
%Cpu1  :  2.9 us,  1.9 sy,  0.0 ni, 95.2 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  2.9 us,  1.0 sy,  0.0 ni, 96.1 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  1.9 us,  1.0 sy,  0.0 ni, 96.1 id,  0.0 wa,  0.0 hi,  1.0 si,  0.0 st
// main.go
package main

import (
  "fmt"
  "runtime"
)

func main() {
  fmt.Println(runtime.NumCPU())
}

go run main.go

4

2. And I bought the vps so that I could finish 386 linux debugger code, nothing else on that machine. I will send ip/user/passward to your email, you can also check what happend.

3. I think I need to build one full 386 linux vm on local pc and try to find more infomation.

aarzilli

comment created time in 2 months

pull request commentgo-delve/delve

scripts/make: do not test buildmode=pie on linux/386

Tow scripts 

for ((i=1; i<=100; i++)); do go test -v -test.run TestNextConcurrent$ ; done

for ((i=1; i<=100; i++)); do go test -test-buildmode=pie -v -test.run TestNextConcurrent$ ; done

(Not only TestNextConcurrent, other cases are same) In fact, I have tow 386 circumstances.

  1. I386/centos (2Core/4G) remote vps hang (exceed 10m) with high probability on both pie and nopie. I can see the generated exe didn't exit and output nothing when hanging.

  2. I386/centos local docker on amd64 is always ok.

I can't explain this , myabe need to collect more information to find mini reproduction-conditions.

aarzilli

comment created time in 2 months

more