Support Wine 6.23's fixed winedbg arg handling

I was about to rebase the patch I've been resubmitting to Wine that
fixed this when I noticed that
https://github.com/wine-mirror/wine/commit/94ca4be2a62cdb05adaee524084875b04b283afb
now does the same thing.
This commit is contained in:
Robbert van der Helm
2021-12-07 00:59:07 +01:00
parent 97163e8415
commit 35244d2c7f
4 changed files with 22 additions and 8 deletions
+5
View File
@@ -8,6 +8,11 @@ Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
### Changed
- Added support for Wine 6.23's new fixed winedbg command line argument
handling.
### Fixed ### Fixed
- Fixed sluggish UIs in _Output's Thermal_ and likely a handful of other - Fixed sluggish UIs in _Output's Thermal_ and likely a handful of other
+4
View File
@@ -139,6 +139,10 @@ if wine_version.returncode() == 0
message('- Using the cdecl calling convention') message('- Using the cdecl calling convention')
compiler_options += '-DWINE_USE_CDECL' compiler_options += '-DWINE_USE_CDECL'
endif endif
if wine_version.stdout().version_compare('<6.23') and with_winedbg
message('- Using legacy winedbg argument quoting')
compiler_options += '-DWINEDBG_LEGACY_ARGUMENT_QUOTING'
endif
else else
warning('Unable to determine the current Wine version') warning('Unable to determine the current Wine version')
endif endif
+4 -4
View File
@@ -67,10 +67,10 @@ IndividualHost::IndividualHost(boost::asio::io_context& io_context,
host( host(
launch_host(host_path, launch_host(host_path,
plugin_type_to_string(host_request.plugin_type), plugin_type_to_string(host_request.plugin_type),
#ifdef WITH_WINEDBG #if defined(WITH_WINEDBG) && defined(WINEDBG_LEGACY_ARGUMENT_QUOTING)
// Winedbg flattens all command line arguments to a single // Old versions of winedbg flattened all command line
// space separate Win32 command line, so we need to do our // arguments to a single space separated Win32 command
// own quoting. // line, so we had to do our own quoting
"\"" + plugin_info.windows_plugin_path + "\"", "\"" + plugin_info.windows_plugin_path + "\"",
#else #else
host_request.plugin_path, host_request.plugin_path,
+9 -4
View File
@@ -77,14 +77,19 @@ class HostProcess {
// window managers require some slight modifications to spawn a // window managers require some slight modifications to spawn a
// detached terminal emulator. Alternatively, you can spawn // detached terminal emulator. Alternatively, you can spawn
// `/usr/bin/winedbg` with the `--no-start` option to launch a gdb // `/usr/bin/winedbg` with the `--no-start` option to launch a gdb
// server and then connect to it from another terminal. Note the // server and then connect to it from another terminal.
// double quoting here, winedbg doesn't respect `argv` and instead
// expects a standard Win32 command line.
"/usr/bin/kstart5", "konsole", "--", "-e", "winedbg", "--gdb", "/usr/bin/kstart5", "konsole", "--", "-e", "winedbg", "--gdb",
#ifdef WINEDBG_LEGACY_ARGUMENT_QUOTING
// Note the double quoting here. Old versions of winedbg didn't
// respect `argv` and instead expected a pre-quoted Win32 command
// line as its arguments.
"\"" + host_path.string() + ".so\"", "\"" + host_path.string() + ".so\"",
#else
host_path.string() + ".so",
#endif // WINEDBG_LEGACY_ARGUMENT_QUOTING
#else #else
host_path, host_path,
#endif #endif // WITH_WINEDBG
boost::process::std_out = stdout_pipe, boost::process::std_out = stdout_pipe,
boost::process::std_err = stderr_pipe, boost::process::std_err = stderr_pipe,
// NOTE: If the Wine process outlives the host, then it may cause // NOTE: If the Wine process outlives the host, then it may cause