Date: Thu, 25 Jun 2009 09:17:50 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r194946 - in stable/7/contrib/gdb: . gdb Message-ID: <200906250917.n5P9Hog8046012@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Thu Jun 25 09:17:50 2009 New Revision: 194946 URL: http://svn.freebsd.org/changeset/base/194946 Log: MFC r194061: gdb: make 'thread apply all bt' always work on all threads Modified: stable/7/contrib/gdb/ (props changed) stable/7/contrib/gdb/gdb/stack.c Modified: stable/7/contrib/gdb/gdb/stack.c ============================================================================== --- stable/7/contrib/gdb/gdb/stack.c Thu Jun 25 09:07:40 2009 (r194945) +++ stable/7/contrib/gdb/gdb/stack.c Thu Jun 25 09:17:50 2009 (r194946) @@ -1230,6 +1230,22 @@ backtrace_command_1 (char *count_exp, in printf_filtered ("(More stack frames follow...)\n"); } +struct backtrace_command_args + { + char *count_exp; + int show_locals; + int from_tty; + }; + +/* Stub to call backtrace_command_1 by way of an error catcher. */ +static int +backtrace_command_stub (void *data) +{ + struct backtrace_command_args *args = (struct backtrace_command_args *)data; + backtrace_command_1 (args->count_exp, args->show_locals, args->from_tty); + return 0; +} + static void backtrace_command (char *arg, int from_tty) { @@ -1237,6 +1253,7 @@ backtrace_command (char *arg, int from_t char **argv = (char **) NULL; int argIndicatingFullTrace = (-1), totArgLen = 0, argc = 0; char *argPtr = arg; + struct backtrace_command_args btargs; if (arg != (char *) NULL) { @@ -1286,7 +1303,10 @@ backtrace_command (char *arg, int from_t } } - backtrace_command_1 (argPtr, (argIndicatingFullTrace >= 0), from_tty); + btargs.count_exp = argPtr; + btargs.show_locals = (argIndicatingFullTrace >= 0); + btargs.from_tty = from_tty; + catch_errors (backtrace_command_stub, (char *)&btargs, "", RETURN_MASK_ERROR); if (argIndicatingFullTrace >= 0 && totArgLen > 0) xfree (argPtr); @@ -1299,7 +1319,11 @@ static void backtrace_full_command (char static void backtrace_full_command (char *arg, int from_tty) { - backtrace_command_1 (arg, 1, from_tty); + struct backtrace_command_args btargs; + btargs.count_exp = arg; + btargs.show_locals = 1; + btargs.from_tty = from_tty; + catch_errors (backtrace_command_stub, (char *)&btargs, "", RETURN_MASK_ERROR); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906250917.n5P9Hog8046012>