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