mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
Issue #12640: run in-build GIMP binary through a debugger when gdb is available.
It is not in fact a fix for #12640, only an improvement to our build script, wrapping our calls to GIMP executables and outputting a backtrace on a crash. This way, when people report issues during one of the relevant calls, we may be able to diagnose. It won't be useful for other types of failures (when the process doesn't crash, but e.g. the script is wrong or other non-fatal bugs in GIMP).
This commit is contained in:
parent
d58fe9e329
commit
7694b1dc04
3 changed files with 17 additions and 2 deletions
|
@ -1952,6 +1952,7 @@ subdir('app-tools')
|
|||
|
||||
gimp_run_env=environment()
|
||||
gimp_run_env.set('GIMP_GLOBAL_BUILD_ROOT', meson.global_build_root())
|
||||
gimp_run_env.set('GIMP_GLOBAL_SOURCE_ROOT', meson.global_source_root())
|
||||
|
||||
if meson.can_run_host_binaries() and have_gobject_introspection
|
||||
if enable_console_bin
|
||||
|
|
8
tools/debug-in-build-gimp.py
Normal file
8
tools/debug-in-build-gimp.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
def my_signal_handler (event):
|
||||
if (isinstance(event, gdb.SignalEvent)):
|
||||
gdb.write("Eeeeeeeeeeeek: in-build GIMP crashed!\n")
|
||||
gdb.execute('info threads')
|
||||
gdb.execute("thread apply all backtrace full")
|
||||
|
||||
gdb.events.stop.connect(my_signal_handler)
|
||||
gdb.execute("run")
|
|
@ -24,7 +24,13 @@ if [ -n "$GIMP_TEMP_UPDATE_RPATH" ]; then
|
|||
unset IFS
|
||||
fi
|
||||
|
||||
if command -v gdb; then
|
||||
echo RUNNING: cat /dev/stdin "|" gdb --batch -x "$GIMP_GLOBAL_SOURCE_ROOT/tools/debug-in-build-gimp.py" --args $GIMP_SELF_IN_BUILD "$@"
|
||||
cat /dev/stdin | gdb --return-child-result --batch -x "$GIMP_GLOBAL_SOURCE_ROOT/tools/debug-in-build-gimp.py" --args $GIMP_SELF_IN_BUILD "$@"
|
||||
else
|
||||
echo RUNNING: cat /dev/stdin "|" $GIMP_SELF_IN_BUILD "$@"
|
||||
cat /dev/stdin | $GIMP_SELF_IN_BUILD "$@"
|
||||
fi
|
||||
|
||||
if [ -n "$GIMP_TEMP_UPDATE_RPATH" ]; then
|
||||
export IFS=":"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue