• Kevin Locke's avatar
    d/thunderbird-wrapper.sh: Make gdb call more fail safe · d003e26e
    Kevin Locke authored
    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.  Instead, use the
    following steps:
    1. Build a command string which combines ${TB_GDB_DEFAULT_OPTS} and
       ${TB_ARGS[@]} (using `printf ' %q'`).
    2. Print the command string with output_info.
    3. Run it using `eval` (for word splitting) and `exec` (to replace the
       shell process with gdb, as before).
    Signed-off-by: default avatarKevin Locke <kevin@kevinlocke.name>