summaryrefslogtreecommitdiffstats
path: root/gdb-native.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-30 18:29:00 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-30 18:29:00 +0200
commit662dd0f910150228ba93096d77637f697c2c3ed7 (patch)
treee1682766912b5bc074ca2c1040ce55d3b89b3f94 /gdb-native.go
parentcfe84507a37a65efcb22e7abe3247b4c7704d0a8 (diff)
Don't try to send signal while gdb is not started.
Diffstat (limited to 'gdb-native.go')
-rw-r--r--gdb-native.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb-native.go b/gdb-native.go
index a4e6189..4bae3d3 100644
--- a/gdb-native.go
+++ b/gdb-native.go
@@ -151,6 +151,9 @@ func (g *GdbNative) Write(args ...interface{}) error {
// SendSignal is used to send a signal to remote process/gdb
func (g *GdbNative) SendSignal(sig os.Signal) error {
+ if g.exeCmd == nil {
+ return fmt.Errorf("exeCmd not initialized")
+ }
return g.exeCmd.Process.Signal(sig)
}