mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-22 20:07:28 +02:00
Revert back to the detached Konsole window winedbg
This works again, and it's a bit less of a pain than connecting to gdbserver.
This commit is contained in:
@@ -897,20 +897,17 @@ within the loaded VST plugin itself.
|
|||||||
|
|
||||||
### Attaching a debugger
|
### Attaching a debugger
|
||||||
|
|
||||||
To debug the plugin you can just attach gdb to the host as long as any
|
To debug the plugin, you can just attach gdb to the host. Debugging the Wine
|
||||||
sandboxing or out of process hosting is disabled (or you'll have to wrap around
|
plugin host is a bit trickier. Wine comes with a GDB proxy for winedbg, but it
|
||||||
that host process). Debugging the Wine plugin host is a bit more difficult. Wine
|
requires a little bit of additional setup and it expects the command line
|
||||||
comes with a GDB proxy for winedbg, but it requires a little bit of additional
|
arguments to be a valid Win32 command line. You'll also need to launch winedbg
|
||||||
setup and it doesn't support arguments containing spaces. To make this a bit
|
in a seperate detached terminal emulator so it doesn't terminate together with
|
||||||
easier, yabridge includes winedbg support behind a build option. You can enable
|
the plugin, and winedbg can be a bit picky about the arguments it accepts. I've
|
||||||
this using:
|
already set this up behind a feature flag for use in KDE Plasma. Other desktop
|
||||||
|
environments and window managers will require some slight modifications in
|
||||||
|
`src/plugin/host-process.cpp`. To enable this, simply run the follow and then
|
||||||
|
rebuild yabridge:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
meson configure build --buildtype=debug -Dwith-winedbg=true
|
meson configure build --buildtype=debug -Dwith-winedbg=true
|
||||||
```
|
```
|
||||||
|
|
||||||
Currently winedbg's normal GDB proxy is broken, so this option will start a
|
|
||||||
remote GDB server that you have to connect to. You can use `gdb build/yabridge-host.exe.so` to start GDB, and then use the GDB `target` command
|
|
||||||
printed to STDERR or `$YABRIDGE_DEBUG_FILE` to start the debugging session. Note
|
|
||||||
that plugin names with spaces in the actual `.dll` or `.vst3` file name will
|
|
||||||
have to be renamed first for this approach to work.
|
|
||||||
|
|||||||
@@ -73,12 +73,15 @@ class HostProcess {
|
|||||||
Args&&... args) {
|
Args&&... args) {
|
||||||
return boost::process::child(
|
return boost::process::child(
|
||||||
#ifdef WITH_WINEDBG
|
#ifdef WITH_WINEDBG
|
||||||
// Use the terminal output or `$YABRIDGE_DEBUG_LOG` to get
|
// This is set up for KDE Plasma. Other desktop environments and
|
||||||
// yabridge's output, and use the printed target command in a GDB
|
// window managers require some slight modifications to spawn a
|
||||||
// session where you load the yabridge `.so` file you're trying to
|
// detached terminal emulator. Alternatively, you can spawn
|
||||||
// debug
|
// `/usr/bin/winedbg` with the `--no-start` option to launch a gdb
|
||||||
"/usr/bin/winedbg", "--gdb", "--no-start",
|
// server and then connect to it from another terminal. Note the
|
||||||
host_path.string() + ".so",
|
// double quoting here, winedbg doesn't respect `argv` and instead
|
||||||
|
// expects a standard Win32 command line.
|
||||||
|
"/usr/bin/kstart5", "konsole", "--", "-e", "winedbg", "--gdb",
|
||||||
|
"\"" + host_path.string() + ".so\"",
|
||||||
#else
|
#else
|
||||||
host_path,
|
host_path,
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user