提交 af0e0286 编写于 作者: D Derek Parker

Move main package to cmd for 'dlv' binary name

上级 1bae0c3c
...@@ -8,6 +8,10 @@ Delve is a Go debugger, written in Go. ...@@ -8,6 +8,10 @@ Delve is a Go debugger, written in Go.
Currently, Delve requires the following [patch](https://codereview.appspot.com/117280043/), however this change is vendored until Go 1.4 lands, so the project is go get-able. Currently, Delve requires the following [patch](https://codereview.appspot.com/117280043/), however this change is vendored until Go 1.4 lands, so the project is go get-able.
```
go get github.com/derekparker/delve/cmd/dlv
```
### Features ### Features
* Attach to an already running process * Attach to an already running process
...@@ -21,19 +25,19 @@ The debugger can be launched in three ways: ...@@ -21,19 +25,19 @@ The debugger can be launched in three ways:
* Compile, run, and attach in one step: * Compile, run, and attach in one step:
``` ```
$ delve -run $ dlv -run
``` ```
* Provide the name of the program you want to debug, and the debugger will launch it for you. * Provide the name of the program you want to debug, and the debugger will launch it for you.
``` ```
$ delve -proc path/to/program $ dlv -proc path/to/program
``` ```
* Provide the pid of a currently running process, and the debugger will attach and begin the session. * Provide the pid of a currently running process, and the debugger will attach and begin the session.
``` ```
$ sudo delve -pid 44839 $ sudo dlv -pid 44839
``` ```
### Breakpoints ### Breakpoints
......
...@@ -16,7 +16,7 @@ import ( ...@@ -16,7 +16,7 @@ import (
"github.com/derekparker/delve/proctl" "github.com/derekparker/delve/proctl"
) )
const version string = "0.1.1.beta" const version string = "0.1.2.beta"
type term struct { type term struct {
stdin *bufio.Reader stdin *bufio.Reader
...@@ -163,7 +163,7 @@ func parseCommand(cmdstr string) (string, []string) { ...@@ -163,7 +163,7 @@ func parseCommand(cmdstr string) (string, []string) {
} }
func (t *term) promptForInput() (string, error) { func (t *term) promptForInput() (string, error) {
prompt := "delve> " prompt := "dlv> "
line := *goreadline.ReadLine(&prompt) line := *goreadline.ReadLine(&prompt)
line = strings.TrimSuffix(line, "\n") line = strings.TrimSuffix(line, "\n")
if line != "" { if line != "" {
......
...@@ -55,7 +55,7 @@ func TestCleanExit(t *testing.T) { ...@@ -55,7 +55,7 @@ func TestCleanExit(t *testing.T) {
var ( var (
waitchan = make(chan *os.ProcessState) waitchan = make(chan *os.ProcessState)
testprog = startTestProg(t, "_fixtures/livetestprog") testprog = startTestProg(t, "../../_fixtures/livetestprog")
) )
go func() { go func() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册