From e64fda5f2ccbb71da26f0044c94ec8bd31af924b Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sun, 23 Aug 2026 19:03:14 +1000 Subject: [PATCH 01/10] typos --- prepare_cmake.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/prepare_cmake.sh b/prepare_cmake.sh index 6529aa9..287b129 100755 --- a/prepare_cmake.sh +++ b/prepare_cmake.sh @@ -17,7 +17,7 @@ ProjectNameFile="$Dir/.sis/project_name.txt" ProjectName=$(tr -d '[:space:]' < "$ProjectNameFile") Configuration=Release -CStandard= +CxxStandard= MSVC_MT=0 MinGW="${MinGW:=0}" RunMake=0 @@ -50,16 +50,16 @@ fi while [[ $# -gt 0 ]]; do case $1 in - --c-standard) + --cxx-standard) shift - CStandard=$1 - case $CStandard in - 99|11|17|23) + CxxStandard=$1 + case $CxxStandard in + 98|11|14|17|20|23) ;; *) - >&2 echo "$ScriptPath: ${SisClr_Red}${SisClr_Bold}invalid C standard '$CStandard'${SisClr_None}; expected 99, 11, 17, or 23" + >&2 echo "$ScriptPath: ${SisClr_Red}${SisClr_Bold}invalid C++ standard '$CxxStandard'${SisClr_None}; expected 98, 11, 14, 17, 20, or 23" exit 1 ;; @@ -172,7 +172,7 @@ cd $CMakeDir echo "Executing CMake for ${SisClr_Blue}${SisClr_Bold}${ProjectName}${SisClr_None} (in ${SisClr_Blue}${SisClr_Bold}${CMakeDir}${SisClr_None})" -if [ -z "$CStandard" ]; then CMakeCStandardVariable="" ; else CMakeCStandardVariable="-DCMAKE_C_STANDARD=$CStandard" ; fi +if [ -z "$CxxStandard" ]; then CMakeCStandardVariable="" ; else CMakeCStandardVariable="-DCMAKE_C_STANDARD=$CxxStandard" ; fi if [ $MSVC_MT -eq 0 ]; then CMakeMsvcMtFlag="OFF" ; else CMakeMsvcMtFlag="ON" ; fi if [ -z "$STLSoftDirGiven" ]; then CMakeSTLSoftVariable="" ; else CMakeSTLSoftVariable="-DSTLSOFT=$STLSoftDirGiven/" ; fi if [ $TestingDisabled -eq 0 ]; then CMakeBuildTestingFlag="ON" ; else CMakeBuildTestingFlag="OFF" ; fi From 6548848cfd464faa78cf070af443ae9b1ee3a4e6 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sun, 23 Aug 2026 19:07:43 +1000 Subject: [PATCH 02/10] Support uninstalled STLSoft source directories Resolve STLSoft before dependent packages and provide the STLSoft::STLSoft target when using a local source directory. --- CMakeLists.txt | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 83d7b93..3270bab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,17 +144,34 @@ endif() # ############################ # STLSoft +# +# NOTE: This is resolved before other dependencies because imported targets +# may reference STLSoft::STLSoft in their link interfaces. if(DEFINED STLSOFT) message("-- STLSOFT provided as CMake variable with value '${STLSOFT}'") - - set(STLSOFT_INCLUDE_DIR ${STLSOFT}/include) + set(STLSOFT_INCLUDE_DIR "${STLSOFT}/include") elseif(DEFINED ENV{STLSOFT}) message("-- STLSOFT provided as environment variable with value '$ENV{STLSOFT}'") + set(STLSOFT_INCLUDE_DIR "$ENV{STLSOFT}/include") +endif() + +if(DEFINED STLSOFT_INCLUDE_DIR) - set(STLSOFT_INCLUDE_DIR $ENV{STLSOFT}/include) + if(NOT IS_DIRECTORY "${STLSOFT_INCLUDE_DIR}") + + message(FATAL_ERROR "STLSoft include directory not found: ${STLSOFT_INCLUDE_DIR}") + endif() + + if(NOT TARGET STLSoft::STLSoft) + + add_library(STLSoft::STLSoft INTERFACE IMPORTED GLOBAL) + set_target_properties(STLSoft::STLSoft PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${STLSOFT_INCLUDE_DIR}" + ) + endif() else() set(STLSoft_REQUIRED_VERSION_ 1.11.1) @@ -166,7 +183,7 @@ endif() if(DEFINED STLSOFT_INCLUDE_DIR) - include_directories(${STLSOFT_INCLUDE_DIR}) + include_directories("${STLSOFT_INCLUDE_DIR}") endif() From 06a00b90b1e477c483da9e8f2554b85f3fe2faec Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sun, 23 Aug 2026 19:11:48 +1000 Subject: [PATCH 03/10] fix --- .github/workflows/ci-cell.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci-cell.yml b/.github/workflows/ci-cell.yml index 2cf3270..6644d06 100644 --- a/.github/workflows/ci-cell.yml +++ b/.github/workflows/ci-cell.yml @@ -39,6 +39,12 @@ jobs: mingw-w64-x86_64-cmake mingw-w64-x86_64-make + - name: Checkout STLSoft + shell: bash + run: | + set -euo pipefail + git clone --depth 1 https://github.com/synesissoftware/STLSoft "$RUNNER_TEMP/stlsoft" + - name: Configure shell: bash run: | @@ -49,9 +55,11 @@ jobs: -DCMAKE_BUILD_TYPE="${{ inputs.build-type }}" \ -DCMAKE_C_COMPILER=gcc \ -DCMAKE_CXX_COMPILER=g++ \ + -DSTLSOFT="$RUNNER_TEMP/stlsoft" \ -DBUILD_TESTING=OFF else cmake -B build -S . \ + -DSTLSOFT="$RUNNER_TEMP/stlsoft" \ -DBUILD_TESTING=OFF fi From 3c2a5d49e214dd4f42e9237602f291ac52e871e2 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sun, 23 Aug 2026 19:13:49 +1000 Subject: [PATCH 04/10] fix --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3270bab..b6898f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,6 +216,8 @@ target_compile_options(${PROJECT_NAME} > $<$: /WX /W4 + + /wd4201 > ) From 2579a8f6bd40a7838ff84c55b2492d78b98d2527 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sun, 23 Aug 2026 19:15:49 +1000 Subject: [PATCH 05/10] fix --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 9760bca..f167704 100644 --- a/main.cpp +++ b/main.cpp @@ -149,7 +149,7 @@ void run() } else { - if (r > STLSOFT_NUM_ELEMENTS(msg) - 3) + if (r > int(STLSOFT_NUM_ELEMENTS(msg) - 3)) { msg[STLSOFT_NUM_ELEMENTS(msg) - 3] = '\r'; msg[STLSOFT_NUM_ELEMENTS(msg) - 2] = '\n'; From 4f3997248332afe36cca5665db1f400c244cf603 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sun, 23 Aug 2026 19:21:40 +1000 Subject: [PATCH 06/10] fix --- main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index f167704..3844158 100644 --- a/main.cpp +++ b/main.cpp @@ -90,7 +90,7 @@ void run() winstl::event ev_buffer_ready(L"DBWIN_BUFFER_READY", false, false); winstl::event ev_data_ready(L"DBWIN_DATA_READY", false, false); - HANDLE hFileMap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(Payload), "DBWIN_BUFFER"); + HANDLE const hFileMap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(Payload), "DBWIN_BUFFER"); if (NULL == hFileMap) { @@ -220,6 +220,8 @@ int wmain(int argc, wchar_t* argv[]) run(); +#ifndef NDEBUG + fwprintf( stderr , L"%.*s: %s:%d: UNEXPECTED\n" @@ -230,6 +232,7 @@ int wmain(int argc, wchar_t* argv[]) ::DebugBreak(); return EXIT_FAILURE; +#endif default: std::wcerr From 9b01ba448669f264c3479280648bb624c2bc2d6a Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sun, 23 Aug 2026 19:27:35 +1000 Subject: [PATCH 07/10] ci --- .github/workflows/ci-cell.yml | 2 +- CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cell.yml b/.github/workflows/ci-cell.yml index 6644d06..e8c9e48 100644 --- a/.github/workflows/ci-cell.yml +++ b/.github/workflows/ci-cell.yml @@ -94,4 +94,4 @@ jobs: set -euo pipefail PREFIX="${RUNNER_TEMP}/install-prefix" PROJECT="$(tr -d '[:space:]' < .sis/project_name.txt)" - "$PREFIX/bin/${PROJECT}.exe" + "$PREFIX/bin/${PROJECT}.exe" --version diff --git a/CMakeLists.txt b/CMakeLists.txt index b6898f4..f419649 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,9 +210,9 @@ target_compile_options(${PROJECT_NAME} $<$,$,$>: -Werror -Wall -Wextra -pedantic - -Wno-ignored-qualifiers - -Wno-incompatible-pointer-types-discards-qualifiers - -Wno-unused-parameter + # -Wno-ignored-qualifiers + # -Wno-incompatible-pointer-types-discards-qualifiers + # -Wno-unused-parameter > $<$: /WX /W4 From 4afa59196a6d9789ce214d1aff36e5853087cfdd Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sun, 23 Aug 2026 19:32:52 +1000 Subject: [PATCH 08/10] 0.0.1 --- AUTHORS.md | 17 +++++++++++++++++ CHANGES.md | 19 +++++++++++++++++++ CMakeLists.txt | 4 +--- INSTALL.md | 41 +++++++++++++++++++++++++++++++++++++++++ NEWS.md | 10 ++++++++++ README.md | 6 ++++-- REQUISITES.md | 26 ++++++++++++++++++++++++++ 7 files changed, 118 insertions(+), 5 deletions(-) create mode 100644 AUTHORS.md create mode 100644 INSTALL.md create mode 100644 NEWS.md create mode 100644 REQUISITES.md diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..b5b0893 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,17 @@ +# ReadDebugString - Authors + + +## Major Contributors + +* Matthew Wilson ([mwsis](https://github.com/mwsis)); + + +## Defect reports, fixes and suggestions (for which we are very grateful) + +* \ (yet); + + +Contributions are welcomed. + + + diff --git a/CHANGES.md b/CHANGES.md index e69de29..adf5fe4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -0,0 +1,19 @@ +# ReadDebugString - Changes + + +## 0.0.1 - 23rd August 2026 + +* Improved CMake flexibility for uninstalled **STLSoft** source trees supplied via **STLSOFT**; +* Added validation and an imported **STLSoft::STLSoft** target for local STLSoft source trees; +* Added Windows **cl** and MinGW CI configuration with STLSoft source checkout; +* Added an installation smoke test using **--version** so the long-running reader is not started; + + +## 0.0.0 - 16th August 2026 + +* Added the initial Windows-only **ReadDebugString** executable scaffold; +* Added **--help** and **--version** command-line handling; +* Added CMake configuration, helper scripts, and editor settings; + + + diff --git a/CMakeLists.txt b/CMakeLists.txt index f419649..fd7065f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,9 +210,7 @@ target_compile_options(${PROJECT_NAME} $<$,$,$>: -Werror -Wall -Wextra -pedantic - # -Wno-ignored-qualifiers - # -Wno-incompatible-pointer-types-discards-qualifiers - # -Wno-unused-parameter + -Wno-anonymous-structs > $<$: /WX /W4 diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..539479d --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,41 @@ +# ReadDebugString - Installation and Use + + +## Building + +The primary build method is **CMake**. From a Visual Studio developer +environment: + +```powershell +cmake -S . -B _build +cmake --build _build --config Release +``` + +If **STLSoft** is not installed as a CMake package, provide its source-tree +root: + +```powershell +cmake -S . -B _build -DSTLSOFT=C:\path\to\STLSoft +cmake --build _build --config Release +``` + +The resulting executable is installed with: + +```powershell +cmake --install _build --config Release +``` + + +## Command-line use + +The program is intended to remain running while it reads messages from the +Windows debugger. Use `--help` or `--version` for commands that terminate +immediately: + +```powershell +ReadDebugString.exe --help +ReadDebugString.exe --version +``` + + + diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..23ab42d --- /dev/null +++ b/NEWS.md @@ -0,0 +1,10 @@ +# ReadDebugString - News + + +| Date | News Item | +| ------------------- | --------- | +| 23rd August 2026 | [0.0.1 released](https://github.com/sistools/ReadDebugString/releases/tag/0.0.1) | +| 16th August 2026 | [0.0.0 released](https://github.com/sistools/ReadDebugString/releases/tag/0.0.0) | + + + diff --git a/README.md b/README.md index ad74804..045c7e6 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,8 @@ cmake -S . -B _build cmake --build _build --config Release ``` +Detailed installation and usage instructions are in [INSTALL.md](./INSTALL.md). + ## Components @@ -50,8 +52,8 @@ The project creates a single executable program, **ReadDebugString**. ## Examples -The current scaffold does not yet expose command-line options or produce -debugger output. +The program supports `--help` and `--version`. Its debugger message-reading +behaviour is still being developed. ## Project Information diff --git a/REQUISITES.md b/REQUISITES.md new file mode 100644 index 0000000..bbabb58 --- /dev/null +++ b/REQUISITES.md @@ -0,0 +1,26 @@ +# ReadDebugString - Requisites + + +## Introduction + +Building **ReadDebugString** requires **CMake** 3.20 or later and a Windows +C++ toolchain supporting C++17. + + +## Required dependencies + +**ReadDebugString** depends on: + +* [**STLSoft**](https://github.com/synesissoftware/STLSoft) 1.11.1 or later; + +An installed **STLSoft** CMake package is used by default. An uninstalled +source tree may be supplied through the **STLSOFT** CMake variable, the +**STLSOFT** environment variable, or **prepare_cmake.sh --stlsoft-root-dir**. + + +## Operating system + +The program targets Microsoft Windows and uses the Windows debugger APIs. + + + From de18e76619d31d1e719f6f785d3e7de1a6bb0139 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sun, 23 Aug 2026 19:38:37 +1000 Subject: [PATCH 09/10] fix --- main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.cpp b/main.cpp index 3844158..17e2567 100644 --- a/main.cpp +++ b/main.cpp @@ -34,6 +34,9 @@ union Payload { +#if defined(__GNUC__) && !defined(__clang__) + __extension__ +#endif struct { DWORD pid; From 62becba551c204ab47ae4ffa67b24a797ea754b6 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Sun, 23 Aug 2026 19:42:24 +1000 Subject: [PATCH 10/10] fix --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd7065f..e35b7ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,18 +207,24 @@ add_executable(${PROJECT_NAME} target_compile_options(${PROJECT_NAME} PRIVATE - $<$,$,$>: + $<$,$,$>: -Werror -Wall -Wextra -pedantic - + > + $<$,$>: -Wno-anonymous-structs > - $<$: + $<$: /WX /W4 /wd4201 > ) +target_link_options(${PROJECT_NAME} + PRIVATE + $<$:-municode> +) + target_link_libraries(${PROJECT_NAME} $<$:STLSoft::STLSoft> )