X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=gdb-xds.go;h=54f2270f189eac4836520e41b2d4e7c1a7a623c6;hb=b14158a8c5c4fdd440bc19c5c72f25a15699d29a;hp=f1216ce573376cc2685518ac37b8094f878703d3;hpb=27bb4e3044b2e8983a6938936baf658b629a443d;p=src%2Fxds%2Fxds-gdb.git diff --git a/gdb-xds.go b/gdb-xds.go index f1216ce..54f2270 100644 --- a/gdb-xds.go +++ b/gdb-xds.go @@ -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 { - 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 @@ -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.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 {