Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-18 12:02:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-18 12:02:39 +0300
commit2451a1951e22fd7761f7e39ededda0bd5cc2d875 (patch)
tree615306055960e0c35c549ee3a88ce041d1e33509 /source/creator
parent987d1df57159afd57f33d7e58681be2fcdebda16 (diff)
parent278e3f7d5fea2a8b3775e76257dfd96a5e5c2f11 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator_args.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 30513bd7986..2840252acb9 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -523,6 +523,7 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
BLI_argsPrintArgDoc(ba, "--log");
BLI_argsPrintArgDoc(ba, "--log-level");
BLI_argsPrintArgDoc(ba, "--log-show-basename");
+ BLI_argsPrintArgDoc(ba, "--log-show-backtrace");
BLI_argsPrintArgDoc(ba, "--log-file");
printf("\n");
@@ -733,6 +734,17 @@ static int arg_handle_log_show_basename_set(int UNUSED(argc), const char **UNUSE
return 0;
}
+static const char arg_handle_log_show_backtrace_set_doc[] =
+"\n\tShow a back trace for each log message (debug builds only)."
+;
+static int arg_handle_log_show_backtrace_set(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
+{
+ /* Ensure types don't become incompatible. */
+ void (*fn)(FILE *fp) = BLI_system_backtrace;
+ CLG_backtrace_fn_set((void (*)(void *))fn);
+ return 0;
+}
+
static const char arg_handle_log_file_set_doc[] =
"<filename>\n"
"\n"
@@ -1820,6 +1832,7 @@ void main_args_setup(bContext *C, bArgs *ba)
BLI_argsAdd(ba, 1, NULL, "--log", CB(arg_handle_log_set), ba);
BLI_argsAdd(ba, 1, NULL, "--log-level", CB(arg_handle_log_level_set), ba);
BLI_argsAdd(ba, 1, NULL, "--log-show-basename", CB(arg_handle_log_show_basename_set), ba);
+ BLI_argsAdd(ba, 1, NULL, "--log-show-backtrace", CB(arg_handle_log_show_backtrace_set), ba);
BLI_argsAdd(ba, 1, NULL, "--log-file", CB(arg_handle_log_file_set), ba);
BLI_argsAdd(ba, 1, "-d", "--debug", CB(arg_handle_debug_mode_set), ba);