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