app: don't check stack_trace_mode anymore in gimp_get_stack_trace().

These are now parallel concepts. The stack_trace_mode is for the CLI
option and the check happens on another level already.
This commit is contained in:
Jehan 2018-02-07 00:45:40 +01:00
parent 07355803a8
commit 753f4cf4a3
1 changed files with 5 additions and 12 deletions

View File

@ -395,23 +395,16 @@ static gchar *
gimp_get_stack_trace (void)
{
gchar *trace = NULL;
#ifndef G_OS_WIN32
gchar *args[7] = { "gdb", "-batch", "-ex", "backtrace full",
full_prog_name, NULL, NULL };
gchar *gdb_stdout;
gchar pid[16];
#endif
/* Though we should theoretically ask with GIMP_STACK_TRACE_QUERY, we
* just assume yes right now. TODO: improve this!
*/
if (stack_trace_mode == GIMP_STACK_TRACE_NEVER)
return NULL;
/* This works only on UNIX systems. On Windows, we'll have to find
* another method, probably with DrMingW.
*/
#ifndef G_OS_WIN32
gchar *args[7] = { "gdb", "-batch", "-ex", "backtrace full",
full_prog_name, NULL, NULL };
gchar *gdb_stdout;
gchar pid[16];
g_snprintf (pid, 16, "%u", (guint) getpid ());
args[5] = pid;