Code Review
/
src
/
xds
/
xds-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixed invalid arg format (must be []byte)
[src/xds/xds-gdb.git]
/
gdb-xds.go
diff --git
a/gdb-xds.go
b/gdb-xds.go
index
e9c74e3
..
54f2270
100644
(file)
--- a/
gdb-xds.go
+++ b/
gdb-xds.go
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2017 "IoT.bzh"
+ * Copyright (C) 2017
-2018
"IoT.bzh"
* Author Sebastien Douheret <sebastien@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Author Sebastien Douheret <sebastien@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@
-29,9
+29,9
@@
import (
"syscall"
"text/tabwriter"
"syscall"
"text/tabwriter"
+ "gerrit.automotivelinux.org/gerrit/src/xds/xds-agent.git/lib/xaapiv1"
+ common "gerrit.automotivelinux.org/gerrit/src/xds/xds-common.git/golib"
"github.com/Sirupsen/logrus"
"github.com/Sirupsen/logrus"
- "github.com/iotbzh/xds-agent/lib/xaapiv1"
- common "github.com/iotbzh/xds-common/golib"
sio_client "github.com/sebd71/go-socket.io-client"
)
sio_client "github.com/sebd71/go-socket.io-client"
)
@@
-401,7
+401,8
@@
func (g *GdbXds) InferiorRead(f func(timestamp, stdout, stderr string)) {
// Write writes message/string into gdb stdin
func (g *GdbXds) Write(args ...interface{}) error {
// Write writes message/string into gdb stdin
func (g *GdbXds) Write(args ...interface{}) error {
- return g.ioSock.Emit(xaapiv1.ExecInEvent, args...)
+ s := fmt.Sprint(args...)
+ return g.ioSock.Emit(xaapiv1.ExecInEvent, []byte(s))
}
// SendSignal is used to send a signal to remote process/gdb
}
// SendSignal is used to send a signal to remote process/gdb
@@
-440,7
+441,9
@@
func (g *GdbXds) printProjectsList() (int, error) {
fmt.Fprintln(writer, "\nList of installed cross SDKs (use: export XDS_SDK_ID=<< ID >>):")
fmt.Fprintln(writer, "ID \t Name")
for _, s := range sdks {
fmt.Fprintln(writer, "\nList of installed cross SDKs (use: export XDS_SDK_ID=<< ID >>):")
fmt.Fprintln(writer, "ID \t Name")
for _, s := range sdks {
- fmt.Fprintf(writer, " %s \t %s\n", s.ID, s.Name)
+ if s.Status == xaapiv1.SdkStatusInstalled {
+ fmt.Fprintf(writer, " %s \t %s\n", s.ID, s.Name)
+ }
}
if len(g.projects) > 0 && len(sdks) > 0 {
}
if len(g.projects) > 0 && len(sdks) > 0 {