From 60974e66c57cacdc2483d74718c4bb0a993d2183 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Mon, 7 Aug 2017 08:49:25 +0200 Subject: Initial commit Signed-off-by: Sebastien Douheret --- gdb-common.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 gdb-common.go (limited to 'gdb-common.go') 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 +} -- cgit 1.2.3-korg