Fix the pahole command breakage due to its Python3 port (RH BZ 1264532).
This commit is contained in:
parent
44ca5e4d1e
commit
e32f96fe44
43
gdb-pahole-python3fix.patch
Normal file
43
gdb-pahole-python3fix.patch
Normal file
@ -0,0 +1,43 @@
|
||||
commit f0ee78c5ccefe388a64273353ecd5c99dae62558
|
||||
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
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()
|
9
gdb.spec
9
gdb.spec
@ -26,7 +26,7 @@ Version: 7.10
|
||||
|
||||
# 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: 22%{?dist}
|
||||
Release: 23%{?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
|
||||
@ -543,6 +543,9 @@ Patch1030: gdb-probes-based-interface-robust-2of2.patch
|
||||
# [ppc64le] Use skip_entrypoint for skip_trampoline_code (RH BZ 1260558).
|
||||
Patch1031: gdb-rhbz1260558-ppc64le-skip_trampoline_code.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
|
||||
%patch1029 -p1
|
||||
%patch1030 -p1
|
||||
%patch1031 -p1
|
||||
%patch1044 -p1
|
||||
|
||||
%patch848 -p1
|
||||
%if 0%{!?el6:1}
|
||||
@ -1350,6 +1354,9 @@ then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Fri Sep 18 2015 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10-23.fc23
|
||||
- Fix the pahole command breakage due to its Python3 port (RH BZ 1264532).
|
||||
|
||||
* Sun Sep 13 2015 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10-22.fc23
|
||||
- Fix gstack to use gdb from $PATH (bugreport by Frank Hirtz, RH BZ 1262589).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user