delve/proc
Matias Lahti 60946a759c proc: Fix command-line arguments on Windows (#501)
* proc: add tests for command-line arguments

adds tests to make sure command-line arguments are passed to Launch() properly

* proc_windows: pass command-line arguments to CreateProcess()

build command-line arguments according to how the standard library does it and pass the command line along to the actual syscall on Windows.

see discussion in #479

* proc: better testing of cmd-line arguments

* proc_windows: fix a possible error-case with passing just 1 argument

previously, the command line pointer passed to sys.CreateProcess was empty, if we had 0 parameters (len(cmd) == 1, as cmd[0] is the executable, so no cmdlineGo would be created, while with any argument it would as len(cmd) > 1). This might cause problems down the road, so make sure we include the command line every time, even if it seems to work without.

* proc: improve testing of command-line arguments

test that arguments with spaces are passed on correctly and DRY failure/success condition checking in the args test
2016-04-21 14:20:38 -07:00
..
test Fix path lookup logic on Windows. 2016-02-05 14:45:27 -08:00
arch.go go fmt 2016-01-24 17:30:23 +01:00
breakpoints.go dlv: Misc refactors 2016-03-17 15:32:30 -07:00
disasm_amd64.go proc: Step should skip function prologue 2016-02-18 09:15:37 -08:00
disasm.go proc: Replaced FunctionEntryToFirstLine with disassembly alternative 2016-02-18 09:11:34 -08:00
doc.go proc, terminal: fix package docstrings 2015-10-27 19:38:57 -07:00
eval.go dlv: Misc refactors 2016-03-17 15:32:30 -07:00
exc_user_darwin.c Rename package proctl -> proc 2015-06-12 14:49:23 -05:00
exc.h Rename package proctl -> proc 2015-06-12 14:49:23 -05:00
exec_darwin.c proc: Use correct type for mach task 2016-04-12 22:53:13 -07:00
exec_darwin.h proc: Use correct type for mach task 2016-04-12 22:53:13 -07:00
go_version.go tests: Add test for #149, fixed TestNextGeneral on tip 2016-02-28 16:44:22 -08:00
mach_exc_user_darwin.c Rename package proctl -> proc 2015-06-12 14:49:23 -05:00
mach_exc.defs Rename package proctl -> proc 2015-06-12 14:49:23 -05:00
mach_exc.h Rename package proctl -> proc 2015-06-12 14:49:23 -05:00
mem.go proc: Possible panic while reading uninitialised memory 2016-01-27 13:25:49 +01:00
proc_darwin.c proc: Use correct type for mach task 2016-04-12 22:53:13 -07:00
proc_darwin.go proc: Use correct type for mach task 2016-04-12 22:53:13 -07:00
proc_darwin.h proc: Use correct type for mach task 2016-04-12 22:53:13 -07:00
proc_linux.go proc: TODO trace stop status on kernel versions 2016-03-14 09:43:55 -07:00
proc_test.go proc: Fix command-line arguments on Windows (#501) 2016-04-21 14:20:38 -07:00
proc_unix_test.go tests: Add test for #149, fixed TestNextGeneral on tip 2016-02-28 16:44:22 -08:00
proc_windows.go proc: Fix command-line arguments on Windows (#501) 2016-04-21 14:20:38 -07:00
proc.go proc: stacktrace refactoring 2016-03-28 09:01:16 -07:00
ptrace_darwin.go Add support for Windows. 2016-01-20 19:06:31 -08:00
ptrace_linux.go Add support for Windows. 2016-01-20 19:06:31 -08:00
ptrace_windows.go Add support for Windows. 2016-01-20 19:06:31 -08:00
registers_darwin_amd64.go Disassemble command 2016-02-11 16:59:07 -08:00
registers_linux_amd64.go Disassemble command 2016-02-11 16:59:07 -08:00
registers_windows_amd64.go proc: replace cgo with syscalls on windows 2016-02-19 15:55:20 +11:00
registers.go Disassemble command 2016-02-11 16:59:07 -08:00
stack.go proc: Never return a stack trace of zero frames 2016-03-28 09:01:16 -07:00
syscall_windows_amd64.go proc: replace cgo with syscalls on windows 2016-02-19 15:55:20 +11:00
syscall_windows.go proc: replace cgo with syscalls on windows 2016-02-19 15:55:20 +11:00
threads_darwin.c proc: Use correct type for mach task 2016-04-12 22:53:13 -07:00
threads_darwin.go proc: Crash when stepping past the end of the program 2016-02-27 15:15:51 -08:00
threads_darwin.h proc: Use correct type for mach task 2016-04-12 22:53:13 -07:00
threads_linux.go proc: Add process state T 2016-03-14 09:39:39 -07:00
threads_windows.go proc: Crash when stepping past the end of the program 2016-02-27 15:15:51 -08:00
threads.go proc: bugfix: Truncate stacktrace when FDE of a frame can not be found 2016-03-28 09:01:16 -07:00
types.go proc: Caching type offsets 2016-03-05 13:04:11 +01:00
variables.go proc: stacktrace refactoring 2016-03-28 09:01:16 -07:00
zsyscall_windows.go proc: replace cgo with syscalls on windows 2016-02-19 15:55:20 +11:00