2019-09-30 10:39:25 -04:00
|
|
|
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
|
|
|
|
|
--- a/gdb/python/py-framefilter.c
|
|
|
|
|
+++ b/gdb/python/py-framefilter.c
|
2020-07-24 10:59:18 +08:00
|
|
|
@@ -1204,6 +1204,7 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
2019-09-30 10:39:25 -04:00
|
|
|
htab_eq_pointer,
|
|
|
|
|
NULL));
|
|
|
|
|
|
|
|
|
|
+ int count_printed = 0;
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
gdbpy_ref<> item (PyIter_Next (iterable.get ()));
|
2020-07-24 10:59:18 +08:00
|
|
|
@@ -1212,8 +1213,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
2019-09-30 10:39:25 -04:00
|
|
|
{
|
|
|
|
|
if (PyErr_Occurred ())
|
|
|
|
|
{
|
2020-01-13 14:20:40 +08:00
|
|
|
- gdbpy_print_stack_or_quit ();
|
2019-09-30 10:39:25 -04:00
|
|
|
- return EXT_LANG_BT_ERROR;
|
|
|
|
|
+ gdbpy_print_stack ();
|
|
|
|
|
+ return count_printed > 0 ? EXT_LANG_BT_ERROR : EXT_LANG_BT_NO_FILTERS;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
2020-07-24 10:59:18 +08:00
|
|
|
@@ -1245,7 +1246,8 @@ gdbpy_apply_frame_filter (const struct extension_language_defn *extlang,
|
2019-09-30 10:39:25 -04:00
|
|
|
/* Do not exit on error printing a single frame. Print the
|
|
|
|
|
error and continue with other frames. */
|
|
|
|
|
if (success == EXT_LANG_BT_ERROR)
|
2020-01-13 14:20:40 +08:00
|
|
|
- gdbpy_print_stack_or_quit ();
|
2019-09-30 10:39:25 -04:00
|
|
|
+ gdbpy_print_stack ();
|
|
|
|
|
+ count_printed++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success;
|