gdb/gdb-btrobust.patch
Sergio Durigan Junior f637971ee3 - Rebase to FSF GDB 8.0.50.20171204 (8.1pre).
- Implemented new method for dealing with local patches.
2017-12-07 23:31:26 -05:00

51 lines
1.5 KiB
Diff

From a02022ce4c7a1841518e9cf17d1d9b7cade13483 Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: gdb-btrobust.patch
FileName: gdb-btrobust.patch
;; Continue backtrace even if a frame filter throws an exception (Phil Muldoon).
;;=push
This should fix the error with glib. An error message will still be
printed, but a default backtrace will occur in this case.
--
---
gdb/python/py-framefilter.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
index 75b055c98c..9f33a7aab9 100644
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -1388,6 +1388,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
htab_eq_pointer,
NULL));
+ int count_printed = 0;
while (true)
{
gdbpy_ref<> item (PyIter_Next (iterable.get ()));
@@ -1397,7 +1398,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
if (PyErr_Occurred ())
{
gdbpy_print_stack ();
- return EXT_LANG_BT_ERROR;
+ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS;
}
break;
}
@@ -1409,6 +1410,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
error and continue with other frames. */
if (success == EXT_LANG_BT_ERROR)
gdbpy_print_stack ();
+ count_printed++;
}
return success;
--
2.14.3