Hello community,

here is the log from the commit of package gdb for openSUSE:Leap:15.2 checked 
in at 2020-04-28 20:09:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/gdb (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.gdb.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gdb"

Tue Apr 28 20:09:54 2020 rev:33 rq:797159 version:8.3.1

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/gdb/gdb.changes        2020-02-25 
12:17:04.300418608 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.gdb.new.2738/gdb.changes      2020-04-28 
20:09:55.248380238 +0200
@@ -1,0 +2,12 @@
+Mon Apr 20 14:29:12 UTC 2020 - Tom de Vries <tdevr...@suse.com>
+
+- Fix python 3.8 warning [bsc#1169495].
+  * 
gdb-fix-incorrect-use-of-is-operator-for-comparison-in-python-lib-gdb-command-prompt.py.patch
+
+-------------------------------------------------------------------
+Tue Apr 14 07:40:12 UTC 2020 - Tom de Vries <tdevr...@suse.com>
+
+- Fix build with gcc 10 [bsc#1169368, swo#25717].
+  * bfd-change-num_group-to-unsigned-int.patch
+
+-------------------------------------------------------------------

New:
----
  bfd-change-num_group-to-unsigned-int.patch
  
gdb-fix-incorrect-use-of-is-operator-for-comparison-in-python-lib-gdb-command-prompt.py.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gdb.spec ++++++
--- /var/tmp/diff_new_pack.yMb4rY/_old  2020-04-28 20:09:57.568385055 +0200
+++ /var/tmp/diff_new_pack.yMb4rY/_new  2020-04-28 20:09:57.568385055 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package gdb
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 # Copyright (c) 2012 RedHat
 #
 # All modifications and additions to the file contributed by third parties
@@ -39,7 +39,7 @@
 # Do not provide URL for snapshots as the file lasts there only for 2 days.
 # ftp://sourceware.org/pub/gdb/releases/gdb-%%{version}.tar.gz
 Source:         gdb-%{version}.tar.bz2
-Url:            http://gnu.org/software/gdb/
+URL:            http://gnu.org/software/gdb/
 
 %if "%{scl}" == "devtoolset-1.1"
 Obsoletes:      devtoolset-1.0-%{pkg_name}
@@ -251,6 +251,8 @@
 Patch2013:      gdb-arch13-1.diff
 Patch2014:      gdb-arch13-2.diff
 Patch2015:      gdb-arch13-3.diff
+Patch2016:      bfd-change-num_group-to-unsigned-int.patch
+Patch2017:      
gdb-fix-incorrect-use-of-is-operator-for-comparison-in-python-lib-gdb-command-prompt.py.patch
 
 # Proposed patch for PR symtab/24971
 Patch2500:      gdb-symtab-prefer-var-def-over-decl.patch
@@ -610,6 +612,8 @@
 %patch2013 -p1
 %patch2014 -p1
 %patch2015 -p1
+%patch2016 -p1
+%patch2017 -p1
 
 %patch2500 -p1
 %patch2501 -p1

++++++ bfd-change-num_group-to-unsigned-int.patch ++++++
bfd: Change num_group to unsigned int

elf.c failed with to with GCC 10 as of

commit 906b3eb9df6c577d3f6e9c3ea5c9d7e4d1e90536
Author: Martin Liska <mli...@suse.cz>
Date:   Tue Mar 24 11:40:10 2020 +0100

    Improve endianess detection.

            PR lto/94249
            * plugin-api.h: Add more robust endianess detection.

binutils-gdb/bfd/elf.c: In function ‘setup_group’:
binutils-gdb/bfd/elf.c:740:35: error: overflow in conversion from ‘unsigned 
int’ to ‘int’ changes value from ‘num_group = 4294967295’ to ‘-1’ 
[-Werror=overflow]
  740 |     elf_tdata (abfd)->num_group = num_group = -1;
      |                                   ^~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:1608: elf.lo] Error 1

Change num_group in elf_obj_tdata to unsigned int to compile with GCC 10.

        PR binutils/25717
        * elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.

---
 bfd/elf-bfd.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index c546b583b8..5f3a5cc04b 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1953,7 +1953,7 @@ struct elf_obj_tdata
   struct sdt_note *sdt_note_head;
 
   Elf_Internal_Shdr **group_sect_ptr;
-  int num_group;
+  unsigned int num_group;
 
   /* Index into group_sect_ptr, updated by setup_group when finding a
      section's group.  Used to optimize subsequent group searches.  */
++++++ 
gdb-fix-incorrect-use-of-is-operator-for-comparison-in-python-lib-gdb-command-prompt.py.patch
 ++++++
Fix incorrect use of 'is' operator for comparison in 
python/lib/gdb/command/prompt.py

The 'is' operator is not meant to be used for comparisons. It currently working
is an implementation detail of CPython.  CPython 3.8 has added a SyntaxWarning
for this.

---
 gdb/python/lib/gdb/command/prompt.py | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gdb/python/lib/gdb/command/prompt.py 
b/gdb/python/lib/gdb/command/prompt.py
index 3d662a7d3f..04b9e49c22 100644
--- a/gdb/python/lib/gdb/command/prompt.py
+++ b/gdb/python/lib/gdb/command/prompt.py
@@ -45,7 +45,7 @@ The currently defined substitutions are:
         self.hook_set = False
 
     def get_show_string (self, pvalue):
-        if self.value is not '':
+        if self.value:
            return "The extended prompt is: " + self.value
         else:
            return "The extended prompt is not set."
@@ -57,7 +57,7 @@ The currently defined substitutions are:
         return ""
 
     def before_prompt_hook(self, current):
-        if self.value is not '':
+        if self.value:
             return gdb.prompt.substitute_prompt(self.value)
         else:
             return None

Reply via email to