aboutsummaryrefslogtreecommitdiffstats
path: root/gdb-common.go
diff options
context:
space:
mode:
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
+}