mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Update winedbg GDB proxy support
The GDB proxy now seems to work again, but only in remote sessions.
This commit is contained in:
@@ -639,20 +639,20 @@ within loaded VST plugin itself.
|
|||||||
|
|
||||||
### Attaching a debugger
|
### Attaching a debugger
|
||||||
|
|
||||||
When needed, I found the easiest way to debug the plugin to be to load it in an
|
To debug the plugin you can just attach gdb to the host as long as any
|
||||||
instance of Carla with gdb attached:
|
sandboxing or out of process hosting is disabled (or you'll have to wrap around
|
||||||
|
that host process). Debugging the Wine plugin host is a bit more difficult. Wine
|
||||||
```shell
|
comes with a GDB proxy for winedbg, but it requires a little bit of additional
|
||||||
env YABRIDGE_DEBUG_FILE=/tmp/yabridge.log YABRIDGE_DEBUG_LEVEL=2 carla --gdb
|
setup and it doesn't support arguments containing spaces. To make this a bit
|
||||||
```
|
easier, yabridge includes winedbg support behind a build option. You can enable
|
||||||
|
this using:
|
||||||
Doing the same thing for the Wine VST host can be a bit tricky. You'll need to
|
|
||||||
launch winedbg in a seperate detached terminal emulator so it doesn't terminate
|
|
||||||
together with the plugin, and winedbg can be a bit picky about the arguments it
|
|
||||||
accepts. I've 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:
|
|
||||||
|
|
||||||
```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 appraoch to work.
|
||||||
|
|||||||
@@ -41,11 +41,10 @@ template <typename... Args>
|
|||||||
bp::child launch_host(fs::path host_path, Args&&... args) {
|
bp::child launch_host(fs::path host_path, Args&&... args) {
|
||||||
return bp::child(
|
return bp::child(
|
||||||
#ifdef WITH_WINEDBG
|
#ifdef WITH_WINEDBG
|
||||||
// This is set up for KDE Plasma. Other desktop environments and
|
// Use the terminal output or `$YABRIDGE_DEBUG_LOG` to get yabridge's
|
||||||
// window managers require some slight modifications to spawn a
|
// output, and use the printed target command in a GDB session where you
|
||||||
// detached terminal emulator.
|
// load the yabridge `.so` file you're trying to debug
|
||||||
"/usr/bin/kstart5", "konsole", "--", "-e", "winedbg", "--gdb",
|
"/usr/bin/winedbg", "--gdb", "--no-start", host_path.string() + ".so",
|
||||||
host_path.string() + ".so",
|
|
||||||
#else
|
#else
|
||||||
host_path,
|
host_path,
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user