public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Test 'info type-printers' Python error (RH BZ 1350436).
Date: Sat, 27 Jun 2026 23:57:40 GMT	[thread overview]
Message-ID: <178260466066.1.13057790191253368555.rpms-gdb-fb74e3a7491e@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : fb74e3a7491e022a894c2c438c4e1f6c565b3580
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date   : 2016-06-27T23:24:13+02:00
Stats  : +81/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/fb74e3a7491e022a894c2c438c4e1f6c565b3580?branch=gdb-17.2-rebase-f44

Log:
Test 'info type-printers' Python error (RH BZ 1350436).

---
diff --git a/gdb-rhbz1350436-type-printers-error.patch b/gdb-rhbz1350436-type-printers-error.patch
new file mode 100644
index 0000000..278bc2c
--- /dev/null
+++ b/gdb-rhbz1350436-type-printers-error.patch
@@ -0,0 +1,73 @@
+Typo in Python support breaks info type-printers command
+https://bugzilla.redhat.com/show_bug.cgi?id=1350436
+
+[testsuite patch] PR python/17136: 'info type-printers' causes an exception when there are per-objfile printers
+https://sourceware.org/ml/gdb-patches/2016-06/msg00455.html
+
+diff -dup -rup gdb-7.6.1/gdb/testsuite/gdb.python-orig/py-typeprint.cc gdb-7.6.1/gdb/testsuite/gdb.python/py-typeprint.cc
+--- gdb-7.6.1/gdb/testsuite/gdb.python-orig/py-typeprint.cc	2013-01-01 07:41:26.000000000 +0100
++++ gdb-7.6.1/gdb/testsuite/gdb.python/py-typeprint.cc	2016-06-27 22:57:58.168642470 +0200
+@@ -31,6 +31,12 @@ templ<basic_string> s;
+ 
+ basic_string bs;
+ 
++class Other
++{
++};
++
++Other ovar;
++
+ int main()
+ {
+   return 0;
+diff -dup -rup gdb-7.6.1/gdb/testsuite/gdb.python-orig/py-typeprint.exp gdb-7.6.1/gdb/testsuite/gdb.python/py-typeprint.exp
+--- gdb-7.6.1/gdb/testsuite/gdb.python-orig/py-typeprint.exp	2013-01-01 07:41:26.000000000 +0100
++++ gdb-7.6.1/gdb/testsuite/gdb.python/py-typeprint.exp	2016-06-27 22:58:13.846785208 +0200
+@@ -51,3 +51,7 @@ gdb_test_no_output "enable type-printer
+ gdb_test "whatis bs" "string" "whatis with enabled printer"
+ 
+ gdb_test "whatis s" "templ<string>"
++
++gdb_test "info type-printers" "Type printers for \[^\r\n\]*/py-typeprint:\r\n *other\r\n.*" \
++	 "info type-printers for other"
++gdb_test "whatis ovar" "type = Another"
+diff -dup -rup gdb-7.6.1/gdb/testsuite/gdb.python-orig/py-typeprint.py gdb-7.6.1/gdb/testsuite/gdb.python/py-typeprint.py
+--- gdb-7.6.1/gdb/testsuite/gdb.python-orig/py-typeprint.py	2013-01-01 07:41:26.000000000 +0100
++++ gdb-7.6.1/gdb/testsuite/gdb.python/py-typeprint.py	2016-06-27 22:57:58.169642479 +0200
+@@ -15,7 +15,7 @@
+ 
+ import gdb
+ 
+-class Recognizer(object):
++class StringRecognizer(object):
+     def __init__(self):
+         self.enabled = True
+ 
+@@ -30,6 +30,26 @@ class StringTypePrinter(object):
+         self.enabled = True
+ 
+     def instantiate(self):
+-        return Recognizer()
++        return StringRecognizer()
+ 
+ gdb.type_printers.append(StringTypePrinter())
++
++class OtherRecognizer(object):
++    def __init__(self):
++        self.enabled = True
++
++    def recognize(self, type_obj):
++        if type_obj.tag == 'Other':
++            return 'Another'
++        return None
++
++class OtherTypePrinter(object):
++    def __init__(self):
++        self.name = 'other'
++        self.enabled = True
++
++    def instantiate(self):
++        return OtherRecognizer()
++
++import gdb.types
++gdb.types.register_type_printer(gdb.objfiles()[0], OtherTypePrinter())

diff --git a/gdb.spec b/gdb.spec
index e920398..1dcfc22 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -27,7 +27,7 @@ Version: 7.11.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: 75%{?dist}
+Release: 76%{?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
@@ -538,6 +538,9 @@ Patch927: gdb-python-gil.patch
 # Fix jit-reader.h for multi-lib.
 Patch978: gdb-jit-reader-multilib.patch
 
+# Test 'info type-printers' Python error (RH BZ 1350436).
+Patch992: gdb-rhbz1350436-type-printers-error.patch
+
 # Never kill PID on: gdb exec PID (Jan Kratochvil, RH BZ 1219747).
 Patch1053: gdb-bz1219747-attach-kills.patch
 
@@ -870,6 +873,7 @@ find -name "*.info*"|xargs rm -f
 %patch925 -p1
 %patch927 -p1
 %patch978 -p1
+%patch992 -p1
 %patch1053 -p1
 %patch1056 -p1
 %patch1073 -p1
@@ -1403,6 +1407,9 @@ then
 fi
 
 %changelog
+* Mon Jun 27 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11.1-76.fc24
+- Test 'info type-printers' Python error (RH BZ 1350436).
+
 * Mon Jun  6 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11.1-75.fc24
 - Rebase to released FSF GDB 7.11.1.
 

                 reply	other threads:[~2026-06-27 23:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260466066.1.13057790191253368555.rpms-gdb-fb74e3a7491e@fedoraproject.org \
    --to=jan.kratochvil@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox