D11235: [DrKonqi] Request change of ptrace scope from KCrash
Oswald Buddenhagen
noreply at phabricator.kde.org
Wed Jan 16 11:00:47 GMT 2019
ossi requested changes to this revision.
ossi added a comment.
This revision now requires changes to proceed.
mark handled issues as done here as well.
INLINE COMMENTS
> ptracer.cpp:47
> + QStringLiteral("%1/kcrash_%2").arg(QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation))
> + .arg(QCoreApplication::applicationPid());
> +
see complementary patch
> ptracer.cpp:60
> + if (write(sfd, msg, 22) > 0) {
> + fd_set set;
> + FD_ZERO(&set);
cruft
> ptracer.cpp:68
> + if (poll(&fd, 1, 1000) > 0 && (fd.revents & POLLIN) &&
> + read(sfd, rmsg, 22) > 0 &&
> + strncmp(msg, rmsg, 22) == 0) {
i'd compare to 22, because we know that the other side sends that.
> ptracer.cpp:69
> + read(sfd, rmsg, 22) > 0 &&
> + strncmp(msg, rmsg, 22) == 0) {
> + qCInfo(DRKONQI_LOG) << "ptracer set to" << pid << "by debugged process";
i'd use memcmp(), as it's a fixed-size data block.
> ptracer.h:22
> +
> +/** On Linux, tell the process to allow the debugger to attach to itr */
> +void setPtracer(qint64 pid);
-r
> crashtest.cpp:133
> parser.addOption(QCommandLineOption(QStringLiteral("autorestart"), i18n("Automatically restart")));
> + parser.addOption(QCommandLineOption(QStringLiteral("kdeinit"), i18n("Start DrKonqi using kdeinit")));
> parser.addPositionalArgument(QStringLiteral("type"), i18n("Type of crash."), QStringLiteral("crash|malloc|div0|assert|threads"));
this addition isn't used or explained anywhere for all i can tell.
REPOSITORY
R871 DrKonqi
REVISION DETAIL
https://phabricator.kde.org/D11235
To: croick, #plasma_workspaces, #frameworks, ossi
Cc: ossi, lepagevalleeemmanuel, maximilianocuria, adridg, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190116/d07b4dff/attachment.html>
More information about the Kde-frameworks-devel
mailing list