diff mbox series

[3/4] kernel-shark: Show the standard error of kshark-record

Message ID 20190710134725.436998774@goodmis.org (mailing list archive)
State Accepted
Commit 8adfaa167000ab4e5c83cdc7e6f87861b766b93b
Headers show
Series kernel-shark: The road to 1.0 | expand

Commit Message

Steven Rostedt July 10, 2019, 1:46 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

When kshark-record fails, report the standard error which can be very useful
for debugging the issue that when wrong. For example, after removing the
kshark lib functions, instead of just having "Unknow error" print when
kshark-record dialog fails, I now get:

  /usr/local/bin/kshark-record: error while loading shared libraries: libkshark-gui.so.0.9.8: cannot open shared object file: No such file or directory

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 kernel-shark/src/KsMainWindow.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp
index 13b50795340c..54aa6d782ad1 100644
--- a/kernel-shark/src/KsMainWindow.cpp
+++ b/kernel-shark/src/KsMainWindow.cpp
@@ -1179,7 +1179,7 @@  void KsMainWindow::_captureFinished(int ret, QProcess::ExitStatus st)
 		QString message = "Capture process failed:<br>";
 
 		message += capture->errorString();
-
+		message += capture->readAllStandardError();
 		_error(message, "captureFinishedErr", false, false);
 	}
 }
@@ -1190,6 +1190,7 @@  void KsMainWindow::_captureError(QProcess::ProcessError error)
 	QString message = "Capture process failed:<br>";
 
 	message += capture->errorString();
+	message += capture->readAllStandardError();
 	_error(message, "captureFinishedErr", false, false);
 }