- Rebase to gdb 7.99.90 (prerelease of gdb 8)
- Updated libstdc++ pretty printers to gdb-libstdc++-v3-python-6.3.1-20170212.tar.bz2. - Added patches from fedora: gdb-release-werror.patch gdb-rhbz1398387-tab-crash-test.patch OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=159
This commit is contained in:
@@ -3,83 +3,32 @@ printed, but a default backtrace will occur in this case.
|
||||
|
||||
--
|
||||
|
||||
Index: gdb-7.9.50.20150520/gdb/python/py-framefilter.c
|
||||
Index: gdb-7.12.50.20170226/gdb/python/py-framefilter.c
|
||||
===================================================================
|
||||
--- gdb-7.9.50.20150520.orig/gdb/python/py-framefilter.c 2015-05-31 17:36:34.681952530 +0200
|
||||
+++ gdb-7.9.50.20150520/gdb/python/py-framefilter.c 2015-05-31 17:55:01.884788031 +0200
|
||||
@@ -1523,6 +1523,7 @@ gdbpy_apply_frame_filter (const struct e
|
||||
PyObject *iterable;
|
||||
PyObject *item;
|
||||
htab_t levels_printed;
|
||||
--- gdb-7.12.50.20170226.orig/gdb/python/py-framefilter.c 2017-02-26 21:33:23.150618708 +0100
|
||||
+++ gdb-7.12.50.20170226/gdb/python/py-framefilter.c 2017-02-26 21:33:29.993667179 +0100
|
||||
@@ -1388,6 +1388,7 @@
|
||||
htab_eq_pointer,
|
||||
NULL));
|
||||
|
||||
+ int count_printed = 0;
|
||||
|
||||
if (!gdb_python_initialized)
|
||||
return EXT_LANG_BT_NO_FILTERS;
|
||||
@@ -1543,24 +1544,7 @@ gdbpy_apply_frame_filter (const struct e
|
||||
iterable = bootstrap_python_frame_filters (frame, frame_low, frame_high);
|
||||
|
||||
if (iterable == NULL)
|
||||
- {
|
||||
- /* Normally if there is an error GDB prints the exception,
|
||||
- abandons the backtrace and exits. The user can then call "bt
|
||||
- no-filters", and get a default backtrace (it would be
|
||||
- confusing to automatically start a standard backtrace halfway
|
||||
- through a Python filtered backtrace). However in the case
|
||||
- where GDB cannot initialize the frame filters (most likely
|
||||
- due to incorrect auto-load paths), GDB has printed nothing.
|
||||
- In this case it is OK to print the default backtrace after
|
||||
- printing the error message. GDB returns EXT_LANG_BT_NO_FILTERS
|
||||
- here to signify there are no filters after printing the
|
||||
- initialization error. This return code will trigger a
|
||||
- default backtrace. */
|
||||
-
|
||||
- gdbpy_print_stack ();
|
||||
- do_cleanups (cleanups);
|
||||
- return EXT_LANG_BT_NO_FILTERS;
|
||||
- }
|
||||
+ goto error_nothing_printed;
|
||||
|
||||
/* If iterable is None, then there are no frame filters registered.
|
||||
If this is the case, defer to default GDB printing routines in MI
|
||||
@@ -1591,15 +1575,40 @@ gdbpy_apply_frame_filter (const struct e
|
||||
while (true)
|
||||
{
|
||||
gdbpy_ref<> item (PyIter_Next (iterable.get ()));
|
||||
@@ -1397,7 +1398,7 @@
|
||||
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 @@
|
||||
error and continue with other frames. */
|
||||
if (success == EXT_LANG_BT_ERROR)
|
||||
gdbpy_print_stack ();
|
||||
+
|
||||
+ count_printed++;
|
||||
}
|
||||
|
||||
if (item == NULL && PyErr_Occurred ())
|
||||
- goto error;
|
||||
+ {
|
||||
+ if (count_printed > 0)
|
||||
+ goto error;
|
||||
+ else
|
||||
+ goto error_nothing_printed;
|
||||
+ }
|
||||
|
||||
done:
|
||||
do_cleanups (cleanups);
|
||||
return success;
|
||||
|
||||
+ /* Normally if there is an error GDB prints the exception,
|
||||
+ abandons the backtrace and exits. The user can then call "bt
|
||||
+ no-filters", and get a default backtrace (it would be
|
||||
+ confusing to automatically start a standard backtrace halfway
|
||||
+ through a Python filtered backtrace). However in the case
|
||||
+ where GDB cannot initialize the frame filters (most likely
|
||||
+ due to incorrect auto-load paths), GDB has printed nothing.
|
||||
+ In this case it is OK to print the default backtrace after
|
||||
+ printing the error message. GDB returns EXT_LANG_BT_NO_FILTERS
|
||||
+ here to signify there are no filters after printing the
|
||||
+ initialization error. This return code will trigger a
|
||||
+ default backtrace. */
|
||||
+
|
||||
+ error_nothing_printed:
|
||||
+ gdbpy_print_stack ();
|
||||
+ do_cleanups (cleanups);
|
||||
+ return EXT_LANG_BT_NO_FILTERS;
|
||||
+
|
||||
/* Exit and abandon backtrace on error, printing the exception that
|
||||
is set. */
|
||||
error:
|
||||
|
Reference in New Issue
Block a user