Commit 4ca31b05 authored by Jehan's avatar Jehan
Browse files

app: add lldb as backtrace-creator alternative to gdb.

It seems that on some platforms (macOS in particular), this may be more
common to have.
parent eab961c9
......@@ -385,6 +385,28 @@ gimp_get_stack_trace (void)
g_free (gdb_stdout);
if (! trace)
/* Alternatively, use LLDB. It seems to be more common on some
* platforms, especially macOS.
gchar *args_lldb[11] = { "lldb", "--attach-pid", NULL, "--batch",
"--one-line", "bt",
"--one-line-on-crash", "bt",
"--one-line-on-crash", "quit", NULL };
args_lldb[2] = pid;
if (g_spawn_sync (NULL, args_lldb, NULL,
NULL, NULL, &gdb_stdout, NULL, NULL, NULL))
trace = g_strdup (gdb_stdout);
else if (gdb_stdout)
g_free (gdb_stdout);
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