Commit b5af88a5 authored by Jehan's avatar Jehan

devel-docs: add some debugging tricks for Flatpak.

The `info line` in particular was given by Ell and will make trace
handling a lot easier as it means we may not have to ask for traces with
debug symbols or gdb with Flatpak. We can indeed get these infos back
ourselves since we are guaranted to use the exact same binaries.

This together with the change in verbose version output I did 2 weeks
ago (commit bc5f6371), allowing us to check the exact Flatpak hash
commit used by a reporter, Flatpak debugging should be a lot easier with
just the simpler stack trace format.
parent 802ba92c
Pipeline #200335 passed with stages
in 31 minutes and 40 seconds
......@@ -118,6 +118,55 @@ flatpak update --commit=<hash-of-build> org.gimp.GIMP
Then just run your older GIMP!
## Debugging on flatpak
If you want to inspect the sandbox environment, you can do so by
specifying a custom shell instead of the GIMP binary with the following
flatpak run --command=bash org.gimp.GIMP
This will run the exact same environment as the flatpak, which should
also be identical on all machines.
Alternatively you can run the GIMP Flatpak using the GNOME SDK as
runtime (instead of the .Platform) with the `--devel` option. In
particular, it gives you access to a few additional debug tools, such as
`gdb`. Therefore running GIMP with --devel will give better stacktrace,
or you can run explicitly GIMP inside GDB.
Additionally to install debug symbols in the sandbox, run:
flatpak install flathub org.gimp.GIMP.Debug
flatpak install flathub org.gnome.Sdk.Debug
Finally even with reporter trace without debug symbols (yet debug
symbols installed on your side), if you make sure you use exactly the
same flatpak commit as the reporter (see `Testing older GIMP versions`
section), you are ensured to use the same binaries. Hence you can trace
back the code line from an offset.
For instance, say that your trace has this output:
Here is how you can find the proper code line in the Flatpak (provided
you use the right flatpak commit):
$ flatpak install flathub org.gimp.GIMP.Debug org.gnome.Sdk.Debug
$ flatpak run --devel --command=bash org.gimp.GIMP
(flatpak) $ gdb /app/bin/gimp-2.10
(gdb) info line *(file_open_image+0x4e8)
Line 216 of "file-open.c" starts at address 0x4d5738 <file_open_image+1256> and ends at 0x4d5747 <file_open_image+1271>.
## Debugging icons ##
See file `devel-docs/icons.txt` to learn more about our icons, and in
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment