summaryrefslogtreecommitdiffstats
path: root/gdb-common.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-07 08:49:25 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-08-07 18:01:35 +0200
commit60974e66c57cacdc2483d74718c4bb0a993d2183 (patch)
tree2722369e9cf2c7a3fb499011030fc4718f31e30f /gdb-common.go
Initial commitv0.0.1
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'gdb-common.go')
-rw-r--r--gdb-common.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb-common.go b/gdb-common.go
new file mode 100644
index 0000000..a6984cc
--- /dev/null
+++ b/gdb-common.go
@@ -0,0 +1,21 @@
+package main
+
+import "os"
+
+// IGDB is an interface for GDB
+type IGDB interface {
+ Init() (int, error)
+ Close() error
+ SetConfig(name string, value interface{}) error
+ Start(bool) (int, error)
+ Cmd() string
+ Args() []string
+ Env() []string
+ OnError(f func(error))
+ OnDisconnect(f func(error))
+ OnExit(f func(int, error))
+ Read(f func(timestamp, stdout, stderr string))
+ InferiorRead(f func(timestamp, stdout, stderr string))
+ Write(args ...interface{}) error
+ SendSignal(sig os.Signal) error
+}