This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ping [PATCH] Make "backtrace" doesn't print python stack if init python dir get fail


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;
     }



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]