diff --git a/gdb-pahole-python3fix.patch b/gdb-pahole-python3fix.patch new file mode 100644 index 0000000..607af26 --- /dev/null +++ b/gdb-pahole-python3fix.patch @@ -0,0 +1,43 @@ +commit f0ee78c5ccefe388a64273353ecd5c99dae62558 +Author: Jan Kratochvil +Date: Fri Sep 18 20:54:22 2015 +0200 + + pahole.py: Fix the Python3 port. + - https://bugzilla.redhat.com/show_bug.cgi?id=1264532 + +diff --git a/gdb/python/lib/gdb/command/pahole.py b/gdb/python/lib/gdb/command/pahole.py +index dee04f5..e08eaf5 100644 +--- a/gdb/python/lib/gdb/command/pahole.py ++++ b/gdb/python/lib/gdb/command/pahole.py +@@ -55,19 +55,19 @@ It prints the type and displays comments showing where holes are.""" + fieldsize = 8 * ftype.sizeof + + # TARGET_CHAR_BIT +- print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8))) ++ print (' /* %3d %3d */' % (int (bitpos / 8), int (fieldsize / 8)), end = "") + bitpos = bitpos + fieldsize + + if ftype.code == gdb.TYPE_CODE_STRUCT: + self.pahole (ftype, level + 1, field.name) + else: +- print (' ' * (2 + 2 * level)) ++ print (' ' * (2 + 2 * level), end = "") + print ('%s %s' % (str (ftype), field.name)) + + if level == 0: + self.maybe_print_hole(bitpos, 8 * type.sizeof) + +- print (' ' * (14 + 2 * level)) ++ print (' ' * (14 + 2 * level), end = "") + print ('} %s' % name) + + def invoke (self, arg, from_tty): +@@ -75,7 +75,7 @@ It prints the type and displays comments showing where holes are.""" + type = type.strip_typedefs () + if type.code != gdb.TYPE_CODE_STRUCT: + raise (TypeError, '%s is not a struct type' % arg) +- print (' ' * 14) ++ print (' ' * 14, end = "") + self.pahole (type, 0, '') + + Pahole() diff --git a/gdb.spec b/gdb.spec index fd6e514..283af92 100644 --- a/gdb.spec +++ b/gdb.spec @@ -26,7 +26,7 @@ Version: 7.9.1 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 18%{?dist} +Release: 19%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL Group: Development/Debuggers @@ -549,6 +549,9 @@ Patch992: gdb-type-printers-error.patch Patch1031: gdb-probes-based-interface-robust-1of2.patch Patch1032: gdb-probes-based-interface-robust-2of2.patch +# Fix the pahole command breakage due to its Python3 port (RH BZ 1264532). +Patch1044: gdb-pahole-python3fix.patch + %if 0%{!?rhel:1} || 0%{?rhel} > 6 # RL_STATE_FEDORA_GDB would not be found for: # Patch642: gdb-readline62-ask-more-rh.patch @@ -841,6 +844,7 @@ find -name "*.info*"|xargs rm -f %patch992 -p1 %patch1031 -p1 %patch1032 -p1 +%patch1044 -p1 %patch848 -p1 %if 0%{!?el6:1} @@ -1341,6 +1345,9 @@ then fi %changelog +* Fri Sep 18 2015 Jan Kratochvil - 7.9.1-19.fc22 +- Fix the pahole command breakage due to its Python3 port (RH BZ 1264532). + * Wed Sep 2 2015 Sergio Durigan Junior - 7.9.1-18.fc22 - Fix 'Make the probes-based dynamic linker interface more robust to errors' (Sergio Durigan Junior, RH BZ 1259132).