This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
ping [PATCH] Make "backtrace" doesn't print python stack if init python dir get fail
- From: Programmingkid <programmingkidx at gmail dot com>
- To: gdb at sourceware dot org
- Date: Mon, 16 Jun 2014 11:27:00 -0400
- Subject: ping [PATCH] Make "backtrace" doesn't print python stack if init python dir get fail
- Authentication-results: sourceware.org; auth=none
I am pinging this patch to be considered for the next release of gdb. It fixes the error message that is displayed with a backtrace.
It is originally found here: http://www.sourceware.org/ml/gdb-patches/2013-11/msg00881.html
2013-11-28 Hui Zhu <hui@codesourcery.com>
* python/py-framefilter.c(apply_frame_filter): Add check for
"gdb_python_module".
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -1506,7 +1506,10 @@ apply_frame_filter (struct frame_info *f
initialization error. This return code will trigger a
default backtrace. */
- gdbpy_print_stack ();
+ if (gdb_python_module != NULL)
+ gdbpy_print_stack ();
+ else
+ PyErr_Clear ();
do_cleanups (cleanups);
return PY_BT_NO_FILTERS;
}