On Mon, 2019-10-21 at 19:53 +0200, Carsten Schoenert wrote: > Am 21.10.19 um 19:40 schrieb Christophe DELAHAYE: >> I tried to run Thunderbird under GDB to characterize a crash, but the >> command line built by the start script is wrong. > > could you give please an example what is going wrong. > This part of the script was tested several times so before I will apply > any patch I need to understand what is causing issues.
I am able to reproduce the issue with thunderbird 1:78.11.0-1 by running `thunderbird -g` which prints: INFO -> Starting Thunderbird with GDB ... INFO -> LANG= /usr/bin/gdb -ex "handle SIG38 nostop" -ex "handle SIGPIPE nostop" -ex "run" /usr/lib/thunderbird/thunderbird /usr/bin/thunderbird: line 254: /usr/bin/gdb -ex "handle SIG38 nostop" -ex "handle SIGPIPE nostop" -ex "run" /usr/lib/thunderbird/thunderbird : No such file or directory Then exits with code 127. The issue occurs because exec is passed a single argument on line 254, which bash interprets as a path that does not exist. I've attached a patch which changes the quoting to fix the issue with the hope that you may find it more acceptable than Christophe's patch. Thanks for considering, Kevin
>From 119b82022ef8887aea70b0104922a38ce9e020cb Mon Sep 17 00:00:00 2001 Message-Id: <119b82022ef8887aea70b0104922a38ce9e020cb.1623856383.git.ke...@kevinlocke.name> From: Kevin Locke <ke...@kevinlocke.name> Date: Wed, 16 Jun 2021 09:08:10 -0600 Subject: [PATCH] Fix quoting for -g in thunderbird-wrapper.sh Running `thunderbird -g` produces the following error: INFO -> Starting Thunderbird with GDB ... INFO -> LANG= /usr/bin/gdb -ex "handle SIG38 nostop" -ex "handle SIGPIPE nostop" -ex "run" /usr/lib/thunderbird/thunderbird /usr/bin/thunderbird: line 254: /usr/bin/gdb -ex "handle SIG38 nostop" -ex "handle SIGPIPE nostop" -ex "run" /usr/lib/thunderbird/thunderbird : No such file or directory This occurs because exec is passed a single argument, which it interprets as a file name that does not exist. Remove the surrounding quotes so that each argument is passed separately. Signed-off-by: Kevin Locke <ke...@kevinlocke.name> --- debian/thunderbird-wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/thunderbird-wrapper.sh b/debian/thunderbird-wrapper.sh index 7546724f136..2e088812b72 100755 --- a/debian/thunderbird-wrapper.sh +++ b/debian/thunderbird-wrapper.sh @@ -251,7 +251,7 @@ else if dpkg-query -W -f='${Version}' thunderbird-dbgsym &>/dev/null ; then output_info "Starting Thunderbird with GDB ..." output_info "LANG= /usr/bin/gdb ${TB_GDB_DEFAULT_OPTS} -ex \"run\" ${MOZ_LIBDIR}/${MOZ_APP_NAME} ${TB_ARGS[@]}" - LANG='' exec "/usr/bin/gdb ${TB_GDB_DEFAULT_OPTS} -ex \"run\" ${MOZ_LIBDIR}/${MOZ_APP_NAME} ${TB_ARGS[@]}" + LANG='' exec /usr/bin/gdb ${TB_GDB_DEFAULT_OPTS} -ex run "${MOZ_LIBDIR}/${MOZ_APP_NAME}" "${TB_ARGS[@]}" else output_info "No package 'thunderbird-dbgsym' installed! Please install first and restart." output_info "More information how to adjust your sources.list to being able installing" -- 2.30.2