|
|
190f2a |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
190f2a |
From: Fedora GDB patches <invalid@email.com>
|
|
|
190f2a |
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
|
190f2a |
Subject: gdb-btrobust.patch
|
|
|
190f2a |
|
|
|
190f2a |
;; Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
|
|
|
190f2a |
;;=push
|
|
|
190f2a |
|
|
|
190f2a |
This should fix the error with glib. An error message will still be
|
|
|
190f2a |
printed, but a default backtrace will occur in this case.
|
|
|
190f2a |
|
|
|
190f2a |
--
|
|
|
190f2a |
|
|
|
190f2a |
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
|
|
|
190f2a |
--- a/gdb/python/py-framefilter.c
|
|
|
190f2a |
+++ b/gdb/python/py-framefilter.c
|
|
|
190f2a |
@@ -1151,6 +1151,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
|
|
190f2a |
htab_eq_pointer,
|
|
|
190f2a |
NULL));
|
|
|
190f2a |
|
|
|
190f2a |
+ int count_printed = 0;
|
|
|
190f2a |
while (true)
|
|
|
190f2a |
{
|
|
|
190f2a |
gdbpy_ref<> item (PyIter_Next (iterable.get ()));
|
|
|
190f2a |
@@ -1159,8 +1160,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
|
|
190f2a |
{
|
|
|
190f2a |
if (PyErr_Occurred ())
|
|
|
190f2a |
{
|
|
|
190f2a |
- throw_quit_or_print_exception ();
|
|
|
190f2a |
- return EXT_LANG_BT_ERROR;
|
|
|
190f2a |
+ gdbpy_print_stack ();
|
|
|
190f2a |
+ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS;
|
|
|
190f2a |
}
|
|
|
190f2a |
break;
|
|
|
190f2a |
}
|
|
|
190f2a |
@@ -1193,7 +1194,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
|
|
190f2a |
/* Do not exit on error printing a single frame. Print the
|
|
|
190f2a |
error and continue with other frames. */
|
|
|
190f2a |
if (success == EXT_LANG_BT_ERROR)
|
|
|
190f2a |
- throw_quit_or_print_exception ();
|
|
|
190f2a |
+ gdbpy_print_stack ();
|
|
|
190f2a |
+ count_printed++;
|
|
|
190f2a |
}
|
|
|
190f2a |
|
|
|
190f2a |
return success;
|