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

Programmingkid programmingkidx@gmail.com
Mon Jun 16 15:27:00 GMT 2014


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




More information about the Gdb mailing list