ping [PATCH] Make "backtrace" doesn't print python stack if init python dir get fail
Programmingkid <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> * 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; }