From 4252d8fcb357b84a695e16d862b2e8c5f9fb2650 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 20 Aug 2024 23:02:25 +1000 Subject: [PATCH] qt_creator: implement attach to running processes for debugging --- .../patches/qt_creator-14.0.1.patchset | 107 ++++++++++++++---- dev-qt/qt_creator/qt_creator-14.0.1.recipe | 2 +- 2 files changed, 87 insertions(+), 22 deletions(-) diff --git a/dev-qt/qt_creator/patches/qt_creator-14.0.1.patchset b/dev-qt/qt_creator/patches/qt_creator-14.0.1.patchset index 344f27f42..cc9c2fdfa 100644 --- a/dev-qt/qt_creator/patches/qt_creator-14.0.1.patchset +++ b/dev-qt/qt_creator/patches/qt_creator-14.0.1.patchset @@ -1,11 +1,11 @@ -From b579cd55683ed48ab7d7c7b51c1b45af8effbaad Mon Sep 17 00:00:00 2001 +From e5972e3caea07fd78ae226a870d8cd5c9aa96f36 Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Fri, 29 Sep 2023 16:03:27 +0000 Subject: Port 6.0.3 changes to 11.0.03 diff --git a/src/libs/3rdparty/libptyqt/unixptyprocess.cpp b/src/libs/3rdparty/libptyqt/unixptyprocess.cpp -index e9ec1d5..04d1e21 100644 +index d76349a..06fcc78 100644 --- a/src/libs/3rdparty/libptyqt/unixptyprocess.cpp +++ b/src/libs/3rdparty/libptyqt/unixptyprocess.cpp @@ -118,7 +118,10 @@ bool UnixPtyProcess::startProcess(const QString &shellPath, @@ -43,7 +43,7 @@ index e9ec1d5..04d1e21 100644 ttmode.c_cc[VMIN] = 1; ttmode.c_cc[VTIME] = 0; -@@ -322,7 +331,7 @@ void ShellProcess::configChildProcess() +@@ -323,7 +332,7 @@ void ShellProcess::configChildProcess() ioctl(m_handleSlave, TIOCSCTTY, 0); tcsetpgrp(m_handleSlave, sid); @@ -69,10 +69,10 @@ index f0e73be..13d1902 100644 #define HAVE_USLEEP 1 #endif diff --git a/src/libs/3rdparty/sqlite/sqlite3.c b/src/libs/3rdparty/sqlite/sqlite3.c -index 1884b08..e492cf7 100644 +index eaa24a1..470f0f0 100644 --- a/src/libs/3rdparty/sqlite/sqlite3.c +++ b/src/libs/3rdparty/sqlite/sqlite3.c -@@ -41330,7 +41330,7 @@ static int full_fsync(int fd, int fullSync, int dataOnly){ +@@ -42046,7 +42046,7 @@ static int full_fsync(int fd, int fullSync, int dataOnly){ */ if( rc ) rc = fsync(fd); @@ -108,10 +108,10 @@ index a9d0cca..1737508 100644 #else fsync(handle()); diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp -index 4aa3c64..44a9c1d 100644 +index 7a51c63..d74ab44 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp -@@ -234,16 +234,20 @@ int ManhattanStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, +@@ -227,16 +227,20 @@ int ManhattanStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, case PM_DockWidgetSeparatorExtent: retval = 1; break; @@ -132,7 +132,7 @@ index 4aa3c64..44a9c1d 100644 case PM_ToolBarItemMargin: case PM_ToolBarItemSpacing: if (panelWidget(widget)) -@@ -854,6 +858,7 @@ void ManhattanStyle::drawControl( +@@ -861,6 +865,7 @@ void ManhattanStyle::drawControl( } switch (element) { @@ -140,7 +140,7 @@ index 4aa3c64..44a9c1d 100644 case CE_MenuItem: painter->save(); if (const auto mbi = qstyleoption_cast(option)) { -@@ -873,6 +878,7 @@ void ManhattanStyle::drawControl( +@@ -879,6 +884,7 @@ void ManhattanStyle::drawControl( } painter->restore(); break; @@ -148,7 +148,7 @@ index 4aa3c64..44a9c1d 100644 case CE_MenuBarItem: painter->save(); -@@ -1016,6 +1022,7 @@ void ManhattanStyle::drawControl( +@@ -1021,6 +1027,7 @@ void ManhattanStyle::drawControl( } break; @@ -156,7 +156,7 @@ index 4aa3c64..44a9c1d 100644 case CE_MenuBarEmptyArea: { if (creatorTheme()->flag(Theme::FlatMenuBar)) painter->fillRect(option->rect, StyleHelper::baseColor()); -@@ -1029,6 +1036,7 @@ void ManhattanStyle::drawControl( +@@ -1034,6 +1041,7 @@ void ManhattanStyle::drawControl( painter->restore(); } break; @@ -180,10 +180,10 @@ index cf5a8ac..2d4021c 100644 os = LinuxOS; subos = GenericFlavor; diff --git a/src/plugins/qmldesigner/CMakeLists.txt b/src/plugins/qmldesigner/CMakeLists.txt -index 2e29b8d..d85ed9f 100644 +index c290175..29cdf0c 100644 --- a/src/plugins/qmldesigner/CMakeLists.txt +++ b/src/plugins/qmldesigner/CMakeLists.txt -@@ -114,7 +114,7 @@ extend_qtc_library(QmlDesignerCore +@@ -124,7 +124,7 @@ extend_qtc_library(QmlDesignerCore PUBLIC_DEFINES QDS_BUILD_QMLPARSER ) extend_qtc_library(QmlDesignerCore @@ -193,7 +193,7 @@ index 2e29b8d..d85ed9f 100644 ) diff --git a/src/shared/qbs/src/lib/corelib/tools/processutils.cpp b/src/shared/qbs/src/lib/corelib/tools/processutils.cpp -index 02608cc..7e57db7 100644 +index 52963e7..749b312 100644 --- a/src/shared/qbs/src/lib/corelib/tools/processutils.cpp +++ b/src/shared/qbs/src/lib/corelib/tools/processutils.cpp @@ -56,6 +56,8 @@ @@ -237,10 +237,10 @@ index 3749333..6688023 100644 inferiorProcess.setChildProcessModifier([] { // Let the parent know our pid ... diff --git a/src/tools/qml2puppet/CMakeLists.txt b/src/tools/qml2puppet/CMakeLists.txt -index 9244a94..781b5cc 100644 +index a4e3e44..73a1303 100644 --- a/src/tools/qml2puppet/CMakeLists.txt +++ b/src/tools/qml2puppet/CMakeLists.txt -@@ -74,7 +74,7 @@ extend_qtc_executable(qml2puppet +@@ -64,7 +64,7 @@ extend_qtc_executable(qml2puppet ) extend_qtc_executable(qml2puppet @@ -250,17 +250,17 @@ index 9244a94..781b5cc 100644 ) -- -2.43.2 +2.45.2 -From b768b1bcfb8592449a3c52dc64d4bb3d7fe6dcdd Mon Sep 17 00:00:00 2001 +From 4b40d14b2a1bceaf1753613e62181438caeb08e5 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Mon, 15 Apr 2024 21:42:18 +1000 Subject: nanotrace: haiku support diff --git a/src/libs/nanotrace/nanotracehr.cpp b/src/libs/nanotrace/nanotracehr.cpp -index ada5bf6..4739cb0 100644 +index 0006227..869a7d2 100644 --- a/src/libs/nanotrace/nanotracehr.cpp +++ b/src/libs/nanotrace/nanotracehr.cpp @@ -18,6 +18,10 @@ @@ -274,7 +274,7 @@ index ada5bf6..4739cb0 100644 namespace NanotraceHR { namespace { -@@ -91,7 +95,11 @@ std::string getThreadName() +@@ -104,7 +108,11 @@ std::string getThreadName() { std::array buffer; buffer[0] = 0; @@ -288,5 +288,70 @@ index ada5bf6..4739cb0 100644 if (rc != 0) return {}; -- -2.43.2 +2.45.2 + + +From b44afac2db827fec5b3a157cff13c58578680f26 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Tue, 20 Aug 2024 22:53:45 +1000 +Subject: Implement ProcessInfo for Haiku + + +diff --git a/src/libs/utils/processinfo.cpp b/src/libs/utils/processinfo.cpp +index 0717bdd..bfcf14a 100644 +--- a/src/libs/utils/processinfo.cpp ++++ b/src/libs/utils/processinfo.cpp +@@ -19,6 +19,10 @@ + #include + #include + #endif ++#if defined(Q_OS_HAIKU) ++#include ++#include ++#endif + + namespace Utils { + +@@ -175,7 +179,38 @@ static QList processInfoListUnix(const FilePath &deviceRoot) + return getLocalProcessesUsingPs(deviceRoot); + } + +-#if defined(Q_OS_UNIX) ++#if defined(Q_OS_HAIKU) ++ ++QList ProcessInfo::processInfoList(const FilePath &deviceRoot) ++{ ++ if (deviceRoot.needsDevice()) ++ return processInfoListUnix(deviceRoot); ++ ++ QList processes; ++ ++ team_info teamInfo; ++ int32 teamCookie = 0; ++ ++ while (get_next_team_info(&teamCookie, &teamInfo) >= B_OK) { ++ int32 imageCookie = 0; ++ image_info imageInfo; ++ while (get_next_image_info(teamInfo.team, &imageCookie, &imageInfo) == B_OK) { ++ if (imageInfo.type != B_APP_IMAGE && imageInfo.type != B_SYSTEM_IMAGE) ++ continue; ++ break; ++ } ++ ++ ProcessInfo deviceProcess; ++ deviceProcess.processId = teamInfo.team; ++ deviceProcess.executable = QString::fromUtf8(imageInfo.name); ++ deviceProcess.commandLine = QString::fromUtf8(teamInfo.args); ++ processes.append(deviceProcess); ++ } ++ ++ return processes; ++} ++ ++#elif defined(Q_OS_UNIX) + + QList ProcessInfo::processInfoList(const FilePath &deviceRoot) + { +-- +2.45.2 diff --git a/dev-qt/qt_creator/qt_creator-14.0.1.recipe b/dev-qt/qt_creator/qt_creator-14.0.1.recipe index 8bb80a8f3..f086f52e4 100644 --- a/dev-qt/qt_creator/qt_creator-14.0.1.recipe +++ b/dev-qt/qt_creator/qt_creator-14.0.1.recipe @@ -6,7 +6,7 @@ such as Android and iOS." HOMEPAGE="https://www.qt.io/ide/" COPYRIGHT="2024 The Qt Company Ltd" LICENSE="GNU GPL v3" -REVISION="1" +REVISION="2" SOURCE_URI="https://download.qt.io/official_releases/qtcreator/${portVersion%.*}/$portVersion/qt-creator-opensource-src-$portVersion.tar.xz" CHECKSUM_SHA256="9595d2e6c65bb918e78376314341dc2bef491c3200a5c6d5ce6f305509b0b28b" SOURCE_DIR="qt-creator-opensource-src-$portVersion"