Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
5.12.6
-
None
-
debug target : colibri imx6, with Qt 5.12.6, with EGLFS
debug host : ubuntu 19.04, with the correct toolchain for the target (I make both the target system and the toolchain)
Description
So in release, I have no problem to execute this code, it return my the Ip address of the target :
QProcess process; process.start("ifconfig eth0"); process.waitForFinished(-1); QByteArray l_result = process.readAll(); qDebug() << process.errorString(); QRegExp ipAddr("inet addr:([0-9.]*)"); if(ipAddr.indexIn(l_result)>=0) { return ipAddr.cap(1); } else { return "0.0.0.0"; }
but when I'm in debug on the eth0 interface, I get the following process.errorString() :
"execvp: No such file or directory"
and l_result is empty.
I'm using remote debug, as the target is a colibri imx6.
Edit : another example that half works :
this code, very early in the main :
QProcess process; process.start("gpg --import /usr/share/gpg_public.key"); process.waitForFinished(-1); // will wait forever until finished qDebug() << process.errorString(); process.start("fw_printenv -n restoreAppFiles"); process.waitForFinished(-1); // will wait forever until finished qDebug() << process.errorString();
give the following output :
"Unknown error" "execvp: No such file or directory"
so the first one is correctly executed, while the second one is not.