Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package crash for openSUSE:Factory checked 
in at 2023-04-14 13:13:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crash (Old)
 and      /work/SRC/openSUSE:Factory/.crash.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "crash"

Fri Apr 14 13:13:45 2023 rev:184 rq:1079223 version:8.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/crash/crash.changes      2023-01-21 
19:11:21.969231646 +0100
+++ /work/SRC/openSUSE:Factory/.crash.new.19717/crash.changes   2023-04-14 
13:13:52.987840077 +0200
@@ -1,0 +2,26 @@
+Thu Apr 13 11:42:28 UTC 2023 - Petr Tesařík <p...@tesarici.cz>
+
+- crash-EPPIC-extension-support-for-crash-8.x-gdb-10.x.patch: EPPIC
+  extension support for crash-8.x + gdb-10.x.
+
+-------------------------------------------------------------------
+Wed Apr 12 10:25:15 UTC 2023 - Petr Tesařík <p...@tesarici.cz>
+
+- Update to crash 8.0.2
+  - Update to gdb-10.2
+  - Support kernels at least up to 5.18
+  - Refresh
+    * crash-patch-gdb.patch
+    * crash-extensions-rule-for-defs.patch
+    * crash-SLE15-SP1-Fix-for-PPC64-kernel-virtual-address-translation-in.patch
+  - Remove upstreamed patches
+    * 0019-Add-kernel-version-dependent-check-for-getting-lengt.patch
+    * crash-missing-declarations.patch
+- Disable eppic extension, because it does not built for GDB 10.2.
+- Remove eppic patches
+  * eppic-remove-duplicate-symbols.patch
+  * eppic-support-arm64.patch
+  * eppic-switch-to-system-lib.patch
+- Clean up specfile after the discontinued SIAL extension.
+
+-------------------------------------------------------------------

Old:
----
  0019-Add-kernel-version-dependent-check-for-getting-lengt.patch
  crash-7.3.1.tar.gz
  crash-missing-declarations.patch
  eppic-remove-duplicate-symbols.patch
  eppic-support-arm64.patch
  eppic-switch-to-system-lib.patch
  gdb-7.6.tar.gz
  gdb-7.6.tar.gz.sig

New:
----
  crash-8.0.2.tar.gz
  crash-EPPIC-extension-support-for-crash-8.x-gdb-10.x.patch
  gdb-10.2.tar.gz
  gdb-10.2.tar.gz.sig

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

Other differences:
------------------
++++++ crash.spec ++++++
--- /var/tmp/diff_new_pack.LTyitD/_old  2023-04-14 13:13:54.407848198 +0200
+++ /var/tmp/diff_new_pack.LTyitD/_new  2023-04-14 13:13:54.411848221 +0200
@@ -39,14 +39,6 @@
 %endif
 %endif
 
-Name:           crash
-%ifarch ppc
-%define build_sial 0
-%define build_eppic 0
-%else
-%define build_sial 0
-%define build_eppic 1
-%endif
 %ifarch %ix86 x86_64
 %define build_gcore 1
 %else
@@ -63,20 +55,22 @@
 %define build_kmp 0
 %endif
 %endif
+
+Name:           crash
 URL:            https://crash-utility.github.io/
 Summary:        Crash utility for live systems; netdump, diskdump, LKCD or 
mcore dumpfiles
 License:        GFDL-1.2-only AND GPL-3.0-or-later
 Group:          Development/Tools/Debuggers
-Version:        7.3.1
+Version:        8.0.2
 Release:        0
-Source:         
https://github.com/crash-utility/crash/archive/7.3.1.tar.gz#/%{name}-%{version}.tar.gz
-Source1:        http://ftp.gnu.org/gnu/gdb/gdb-7.6.tar.gz
+Source:         
https://github.com/crash-utility/crash/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source1:        https://ftp.gnu.org/gnu/gdb/gdb-10.2.tar.gz
 Source2:        crash_whitepaper-%{whitepaper_version}.tar.bz2
 Source3:        README.SUSE
 Source4:        sial-scripts-%{scripts_version}.tar.bz2
 Source5:        gcore-%{gcore_version}.tar.bz2
 Source6:        Module.supported
-Source7:        http://ftp.gnu.org/gnu/gdb/gdb-7.6.tar.gz.sig
+Source7:        https://ftp.gnu.org/gnu/gdb/gdb-10.2.tar.gz.sig
 Source8:        gnu.keyring
 Source9:        crash-trace-%{trace_version}.tar.bz2
 Source95:       get-kernel-flavors.sh
@@ -88,29 +82,26 @@
 Patch1:         %{name}-make-emacs-default.diff
 Patch2:         %{name}-sles9-quirk.patch
 Patch4:         %{name}-sles9-time.patch
-Patch8:         %{name}-missing-declarations.patch
 Patch9:         %{name}-debuginfo-compressed.patch
 Patch10:        %{name}_enable_lzo_support.patch
 Patch11:        %{name}-compressed-booted-kernel.patch
-Patch12:        eppic-switch-to-system-lib.patch
 Patch13:        %{name}-patch-gdb.patch
 Patch15:        %{name}_enable_snappy_support.patch
-Patch16:        eppic-support-arm64.patch
 Patch18:        %{name}-stop_read_error_when_intent_is_retry.patch
 Patch21:        %{name}-allow-use-of-sadump-captured-KASLR-kernel.patch
 Patch23:        
%{name}-SLE15-SP1-With-Linux-4.19-rc1-up-MAX_PHYSMEM_BITS-to-128TB.patch
 Patch24:        
%{name}-SLE15-SP1-Fix-for-PPC64-kernel-virtual-address-translation-in.patch
 Patch27:        %{name}-Define-fallback-PN_XNUM.patch
-Patch29:        eppic-remove-duplicate-symbols.patch
 Patch30:        %{name}-enable-zstd-support.patch
 Patch31:        %{name}-extensions-rule-for-defs.patch
-Patch66:        0019-Add-kernel-version-dependent-check-for-getting-lengt.patch
+Patch32:        %{name}-EPPIC-extension-support-for-crash-8.x-gdb-10.x.patch
 Patch90:        %{name}-sial-ps-2.6.29.diff
 Patch99:        %{name}-usrmerge.patch
 BuildRequires:  bison
 BuildRequires:  flex
-BuildRequires:  libeppic-devel
+BuildRequires:  gcc-c++
 BuildRequires:  lzo-devel
+BuildRequires:  makeinfo
 BuildRequires:  ncurses-devel
 %if %{have_snappy}
 BuildRequires:  snappy-devel
@@ -192,56 +183,6 @@
 --------
     David Anderson <ander...@redhat.com>
 
-%if %build_eppic
-%package eppic
-Requires:       %{name} = %{version}
-%if %build_sial
-# Nothing to do
-%else
-Provides:       %{name}-sial = %{version}
-Obsoletes:      %{name}-sial < %{version}
-%endif
-Summary:        Embeddable Pre-Processor and Interpreter for C extension for 
crash
-License:        GPL-2.0-or-later
-Group:          Development/Tools/Debuggers
-
-%description eppic
-EPPIC is a C interpreter that permits easy access to the symbol and type
-information stored in a executable image like a coredump or live memory
-interfaces (e.g. /dev/kmem, /dev/mem). Although it has a strong association
-with live or postmortem kernel analysis, it is not constraint to it and can be
-embedded in any tools that is C friendly.
-
-
-Authors:
---------
-    Luc Chouinard <lucchou...@gmail.com>
-
-%endif
-
-%if %build_sial
-
-%package sial
-Requires:       %{name} = %{version}
-Summary:        SIAL extension for crash
-License:        GPL-2.0-or-later
-Group:          Development/Tools/Debuggers
-
-%description sial
-This module is a prerequisite for the loading of SIAL scripts.
-
-Upon loading the sial.so object file with extend, any SIAL scripts
-located in the /usr/share/sial/crash or $HOME/.sial directories will be
-loaded automatically.
-
-
-
-Authors:
---------
-    David Anderson <ander...@redhat.com>
-
-%endif
-
 %if %build_gcore
 
 %package gcore
@@ -313,7 +254,6 @@
 %patch1 -p1
 %patch2 -p1
 %patch4 -p1
-%patch8 -p1
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
@@ -327,7 +267,6 @@
 %patch24 -p1
 %endif
 %patch27 -p1
-%patch66 -p1
 %if %{have_snappy}
 %patch15 -p1
 %endif
@@ -341,22 +280,18 @@
 #done
 
 %patch31 -p1
+%patch32 -p1
 
 ## SIAL patches
 cd sial-scripts-%{scripts_version}
 %patch90 -p1
 cd -
-## gcore extension
 cd extensions
+## gcore extension
 tar xfvj %{S:5}
-cd -
 ## crash-trace extension
-cd extensions
 tar xfvj %{S:9}
 cd -
-%patch12 -p1
-%patch16 -p1
-%patch29 -p1
 cp %{S:3} .
 mkdir kbuild
 cp %{S:6} memory_driver
@@ -405,18 +340,6 @@
 %if %build_trace
 install -m 0644 extensions/trace.so $RPM_BUILD_ROOT/%{_libdir}/crash/extensions
 %endif
-%if %build_eppic
-install -m 0644 extensions/eppic.so $RPM_BUILD_ROOT/%{_libdir}/crash/extensions
-%endif
-%if %build_sial
-install -m 0644 extensions/sial.so $RPM_BUILD_ROOT/%{_libdir}/crash/extensions
-%endif
-%if %build_eppic
-# scripts
-mkdir -p $RPM_BUILD_ROOT/%{_datadir}/sial/crash
-install -m 0644 sial-scripts-%{scripts_version}/*.c \
-                $RPM_BUILD_ROOT/%{_datadir}/sial/crash
-%endif
 %if 0%{?build_kmp}
 # memory driver module
 export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
@@ -449,23 +372,6 @@
 %defattr(-,root,root)
 %doc crash_whitepaper/*
 
-%if %build_eppic
-%files eppic
-%defattr(-,root,root)
-%{_libdir}/crash/extensions/eppic.so
-%{_datadir}/sial/crash
-%dir %{_datadir}/sial
-%endif
-
-%if %build_sial
-%files sial
-%defattr(-,root,root)
-%doc extensions/libsial/README
-%{_libdir}/crash/extensions/sial.so
-%{_datadir}/sial/crash
-%dir %{_datadir}/sial
-%endif
-
 %if %build_gcore
 
 %files gcore

++++++ crash-7.3.1.tar.gz -> crash-8.0.2.tar.gz ++++++
++++ 16556 lines of diff (skipped)

++++++ crash-EPPIC-extension-support-for-crash-8.x-gdb-10.x.patch ++++++
From: Luc Chouinard <lucchou...@gmail.com>
Date: Fri, 9 Dec 2022 11:19:17 -0800
Subject: EPPIC extension support for crash-8.x + gdb-10.x
Upstream: merged
Git-commit: 2f1085df4dc9c197be9a7a6828a381785058c7b7

The previous version of the interface between eppic and crash/gdb was
messy and not portable. This new version uses a clean interface with
execution through the standard gnu_request and gdb command funnel.

Signed-off-by: Luc Chouinard <lucchou...@gmail.com>
Acked-by: Petr Tesarik <p...@tesarici.cz>
---
 defs.h              |   20 +++
 extensions/eppic.mk |   80 +++++++------
 gdb-10.2.patch      |  302 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 364 insertions(+), 38 deletions(-)

--- a/defs.h
+++ b/defs.h
@@ -4769,6 +4769,23 @@ static inline unsigned int __const_hweig
 
 #endif /* !GDB_COMMON */
 
+typedef enum drill_ops_s {
+       EOP_MEMBER_SIZES,
+       EOP_MEMBER_NAME,
+       EOP_POINTER,
+       EOP_TYPEDEF,
+       EOP_INT,
+       EOP_VALUE,
+       EOP_ARRAY,
+       EOP_UNION,
+       EOP_ENUM,
+       EOP_ENUMVAL,
+       EOP_STRUCT,
+       EOP_FUNCTION,
+       EOP_DONE,
+       EOP_OOPS
+} drill_ops_t;
+
 /*
  *  Common request structure for BFD or GDB data or commands.
  */
@@ -4819,6 +4836,9 @@ struct gnu_request {
        char *member_target_type_name;
        char *member_target_type_tag_name;
        char *type_tag_name;
+       /* callback function for 3rd party symbol and type (EPPIC for now) */
+       void *priv;
+       int (*tcb)(drill_ops_t, struct gnu_request *, const void *, const void 
*, const void *, const void *);
 };
 
 /*
--- a/extensions/eppic.mk
+++ b/extensions/eppic.mk
@@ -11,64 +11,68 @@
 
 TARGET_FLAGS = -D$(TARGET)
 ifeq ($(TARGET), PPC64)
-        TARGET_FLAGS += -m64
+       TARGET_FLAGS += -m64
 endif
 ifeq ($(TARGET), ARM)
-        TARGET_FLAGS += -m32
+       TARGET_FLAGS += -m32
 endif
 ifeq ($(TARGET), MIPS)
-        TARGET_FLAGS += -m32
+       TARGET_FLAGS += -m32
 endif
 ifeq ($(TARGET), X86)
-        TARGET_FLAGS += -m32
+       TARGET_FLAGS += -m32
 endif
 
 APPFILE=eppic/applications/crash/eppic.c
 GIT := $(shell which git 2> /dev/null)
+# crash 8 with gdb 10 uses new third party callback (tcb) API
+EPPIC_BRANCH=v5.0
 
 all:
-       @if [ -f /usr/bin/flex ] && [ -f /usr/bin/bison ]; then \
-         if [ -f ../$(GDB)/crash.target ]; \
-        then \
-        if  [ ! -f $(APPFILE) ]; \
-        then \
-          if [ -f "$(GIT)" ]; \
-          then \
-             if [ -n "$(EPPIC_GIT_URL)" ]; then \
-               git clone $(EPPIC_GIT_OPTIONS) $(EPPIC_GIT_URL) eppic; \
-             else \
-                 if ping -c 1 -W 5 github.com >/dev/null ; then \
-                   git clone $(EPPIC_GIT_OPTIONS) 
https://github.com/lucchouina/eppic.git eppic; \
-                 fi; \
-             fi; \
-          else \
-            if [ ! -f "$(GIT)" ]; then \
-                echo "eppic.so: git command is needed for pulling eppic 
extension code"; \
-            fi; \
-          fi; \
-        fi; \
-        if  [ -f $(APPFILE) ]; \
-        then \
-               make -f eppic.mk eppic.so; \
-        else \
-            echo "eppic.so: failed to pull eppic code from git repo"; \
-        fi; \
-      else \
-           echo "eppic.so: build failed: requires the crash $(GDB) module"; \
-      fi ;\
+       @if [ -f /usr/bin/flex ] && [ -f /usr/bin/bison ]; \
+       then \
+               if [ -f ../$(GDB)/crash.target ]; \
+               then \
+                       if  [ ! -f $(APPFILE) ]; \
+                       then \
+                               if [ -f "$(GIT)" ]; \
+                               then \
+                                       if [ -n "$(EPPIC_GIT_URL)" ]; \
+                                       then \
+                                               git clone $(EPPIC_GIT_OPTIONS) 
$(EPPIC_GIT_URL) eppic; \
+                                       else \
+                                               if ping -c 1 -W 5 github.com 
>/dev/null ; then \
+                                                       git clone -b 
$(EPPIC_BRANCH) $(EPPIC_GIT_OPTIONS) https://github.com/lucchouina/eppic.git 
eppic; \
+                                               fi; \
+                                       fi; \
+                               else \
+                                       if [ ! -f "$(GIT)" ]; then \
+                                               echo "eppic.so: git command is 
needed for pulling eppic extension code"; \
+                                       fi; \
+                               fi; \
+                       fi; \
+                       if  [ -f $(APPFILE) ]; \
+                       then \
+                               make -f eppic.mk eppic.so; \
+                       else \
+                               echo "eppic.so: failed to pull eppic code from 
git repo"; \
+                       fi; \
+               else \
+                       echo "eppic.so: build failed: requires the crash $(GDB) 
module"; \
+               fi ;\
        else \
-         echo "eppic.so: build failed: requires /usr/bin/flex and 
/usr/bin/bison"; \
-    fi
+               echo "eppic.so: build failed: requires /usr/bin/flex and 
/usr/bin/bison"; \
+       fi
 
 lib-eppic: 
        cd eppic/libeppic && make
-            
+
 eppic.so: ../defs.h $(APPFILE) lib-eppic
-       gcc -g -Ieppic/libeppic -I../$(GDB)/gdb -I../$(GDB)/bfd 
-I../$(GDB)/include -I../$(GDB)/gdb/config -I../$(GDB)/gdb/common -I../$(GDB) 
-nostartfiles -shared -rdynamic -o eppic.so $(APPFILE) -fPIC $(TARGET_FLAGS) 
$(GDB_FLAGS) -Leppic/libeppic -leppic 
+       gcc -g -O0 -Ieppic/libeppic -I.. -nostartfiles -shared -rdynamic -o 
eppic.so $(APPFILE) -fPIC $(TARGET_FLAGS) $(GDB_FLAGS) -Leppic/libeppic -leppic
 
 clean:
        if  [ -d eppic/libeppic ]; \
        then \
-         cd eppic/libeppic && make -i clean; \
+               cd eppic/libeppic && make -i clean; \
        fi
        rm -f eppic.so
--- a/gdb-10.2.patch
+++ b/gdb-10.2.patch
@@ -1737,3 +1737,305 @@ exit 0
          struct field *nextfield;
          short nfields;
          struct type *typedef_type, *target_type;
+--- gdb-10.2/gdb/symtab.c.orig
++++ gdb-10.2/gdb/symtab.c
+@@ -6913,7 +6913,7 @@
+ #include "../../defs.h"
+ 
+ static void get_member_data(struct gnu_request *, struct type *, long, int);
+-static void dump_enum(struct type *, struct gnu_request *);
++static void walk_enum(struct type *, struct gnu_request *);
+ static void eval_enum(struct type *, struct gnu_request *);
+ static void gdb_get_line_number(struct gnu_request *);
+ static void gdb_get_datatype(struct gnu_request *);
+@@ -7122,6 +7122,79 @@
+ 
+ 
+ /*
++ * Follow the type linkage for full member and value type resolution, with 
callback
++ */
++static void drillDownType(struct gnu_request *req, struct type *type)
++{
++        while (type)
++        {
++                /* check out for stub types and pull in the definition 
instead */
++                if (TYPE_STUB(type) && TYPE_TAG_NAME(type)) {
++                        struct symbol *sym;
++                        sym = lookup_symbol(TYPE_TAG_NAME(type), 0, 
STRUCT_DOMAIN, 0).symbol;
++                        if (sym)
++                                type = sym->type;
++                }
++                switch (TYPE_CODE(type)) {
++                        drill_ops_t op;
++                        long l1, l2;
++                        int typecode;
++
++                case TYPE_CODE_PTR:
++                        req->tcb(EOP_POINTER, req, 0, 0, 0, 0);
++                        break;
++
++                case TYPE_CODE_TYPEDEF:
++                        req->is_typedef = 1;
++                        req->typecode = TYPE_CODE(type);
++                        if (!req->tcb(EOP_TYPEDEF, req, TYPE_NAME(type), 0, 
0, 0))
++                                return;
++                        break;
++
++                case TYPE_CODE_FUNC:
++                        req->tcb(EOP_FUNCTION, req, 0, 0, 0, 0);
++                        break;
++
++                case TYPE_CODE_ARRAY:
++                        l1 = TYPE_LENGTH (type);
++                        l2 = TYPE_LENGTH (check_typedef(TYPE_TARGET_TYPE 
(type)));
++                        req->tcb(EOP_ARRAY, req, &l1, &l2, 0, 0);
++                        break;
++
++                case TYPE_CODE_VOID:
++                case TYPE_CODE_INT:
++                case TYPE_CODE_BOOL:
++                        l1 = TYPE_LENGTH(type);
++                        req->tcb(EOP_INT, req, &l1, 0, 0, 0);
++                        break;
++
++                case TYPE_CODE_UNION:
++                        op = EOP_UNION;
++                        goto label;
++
++                case TYPE_CODE_ENUM:
++                        op = EOP_ENUM;
++                        goto label;
++
++                case TYPE_CODE_STRUCT:
++                        op = EOP_STRUCT;
++                        goto label;
++
++                default:
++                        typecode = TYPE_CODE(type);
++                        req->tcb(EOP_OOPS, req, &typecode, "Unknown 
typecode", 0, 0);
++                        return; /* not reached */
++
++                label:
++                        l1 = TYPE_LENGTH(type);
++                        req->tcb(op, req, &l1, type, TYPE_TAG_NAME(type), 0);
++                }
++                type = TYPE_TARGET_TYPE(type);
++        }
++        req->tcb(EOP_DONE, req, 0, 0, 0, 0);
++}
++
++/*
+  *  General purpose routine for determining datatypes.
+  */
+ 
+@@ -7149,10 +7222,8 @@
+                 if (req->member)
+                         get_member_data(req, sym->type, 0, 1);
+ 
+-                if (TYPE_CODE(sym->type) == TYPE_CODE_ENUM) {
+-                        if (req->flags & GNU_PRINT_ENUMERATORS)
+-                                dump_enum(sym->type, req);
+-                }
++                if (TYPE_CODE(sym->type) == TYPE_CODE_ENUM)
++                        walk_enum(sym->type, req);
+ 
+                 return;
+         }
+@@ -7172,17 +7243,25 @@
+                 if (gdb_CRASHDEBUG(2))
+                         console("expr->elts[0].opcode: OP_VAR_VALUE\n");
+                 type = expr.get()->elts[2].symbol->type;
+-                if (req->flags & GNU_VAR_LENGTH_TYPECODE) {
++                if (req->tcb) {
++                        long value = SYMBOL_VALUE(expr->elts[2].symbol);
++                        /* callback with symbol value */
+                         req->typecode = TYPE_CODE(type);
+-                        req->length = TYPE_LENGTH(type);
+-                }
+-                if (TYPE_CODE(type) == TYPE_CODE_ENUM) {
+-                        req->typecode = TYPE_CODE(type);
+-                        req->value = SYMBOL_VALUE(expr.get()->elts[2].symbol);
+-                        req->tagname = (char *)TYPE_TAG_NAME(type);
+-                        if (!req->tagname) {
+-                                val = evaluate_type(expr.get());
+-                                eval_enum(value_type(val), req);
++                        req->tcb(EOP_VALUE, req, &value, 0, 0, 0);
++                        drillDownType(req, type);
++                } else {
++                        if (req->flags & GNU_VAR_LENGTH_TYPECODE) {
++                                req->typecode = TYPE_CODE(type);
++                                req->length = TYPE_LENGTH(type);
++                        }
++                        if (TYPE_CODE(type) == TYPE_CODE_ENUM) {
++                                req->typecode = TYPE_CODE(type);
++                                req->value = 
SYMBOL_VALUE(expr->elts[2].symbol);
++                                req->tagname = (char *)TYPE_TAG_NAME(type);
++                                if (!req->tagname) {
++                                        val = evaluate_type(expr.get());
++                                        eval_enum(value_type(val), req);
++                                }
+                         }
+                 }
+                 break;
+@@ -7192,26 +7271,21 @@
+                         console("expr->elts[0].opcode: OP_TYPE\n");
+                     type = expr.get()->elts[1].type;
+ 
+-                req->typecode = TYPE_CODE(type);
+-                req->length = TYPE_LENGTH(type);
+-
+-                if (TYPE_CODE(type) == TYPE_CODE_TYPEDEF) {
+-                        req->is_typedef = TYPE_CODE_TYPEDEF;
+-                        if ((typedef_type = check_typedef(type))) {
+-                                req->typecode = TYPE_CODE(typedef_type);
+-                                req->length = TYPE_LENGTH(typedef_type);
+-                                type = typedef_type;
+-                        }
+-                }
+-
+-                if (TYPE_CODE(type) == TYPE_CODE_ENUM) {
+-                        if (req->is_typedef)
+-                        if (req->flags & GNU_PRINT_ENUMERATORS) {
+-                                if (req->is_typedef)
+-                                        fprintf_filtered(gdb_stdout,
+-                                                "typedef ");
+-                                dump_enum(type, req);
++                if (req->tcb) {
++                        drillDownType(req, type);
++                } else {
++                        req->typecode = TYPE_CODE(type);
++                        req->length = TYPE_LENGTH(type);
++                        if (TYPE_CODE(type) == TYPE_CODE_TYPEDEF) {
++                                req->is_typedef = TYPE_CODE_TYPEDEF;
++                                if ((typedef_type = check_typedef(type))) {
++                                        req->typecode = 
TYPE_CODE(typedef_type);
++                                        req->length = 
TYPE_LENGTH(typedef_type);
++                                        type = typedef_type;
++                                }
+                         }
++                        if (TYPE_CODE(type) == TYPE_CODE_ENUM)
++                                walk_enum(type, req);
+                 }
+ 
+                 if (req->member)
+@@ -7233,36 +7307,38 @@
+  *  identifier, each on its own line.
+  */
+ static void
+-dump_enum(struct type *type, struct gnu_request *req)
++walk_enum(struct type *type, struct gnu_request *req)
+ {
+         int i;
+-        int len;
++        int len, print = (req->flags & GNU_PRINT_ENUMERATORS);
+         long long lastval;
+ 
+-        len = TYPE_NFIELDS (type);
+-        lastval = 0;
+-        if (TYPE_TAG_NAME(type))
+-                fprintf_filtered(gdb_stdout,
+-                        "enum %s {\n", TYPE_TAG_NAME (type));
+-        else
+-                fprintf_filtered(gdb_stdout, "enum {\n");
++        if (print) {
++                if (req->is_typedef)
++                        fprintf_filtered(gdb_stdout, "typedef ");
++                if (TYPE_TAG_NAME(type))
++                        fprintf_filtered(gdb_stdout, "enum %s {\n", 
TYPE_TAG_NAME (type));
++                else
++                        fprintf_filtered(gdb_stdout, "enum {\n");
++        }
+ 
++        len = TYPE_NFIELDS (type);
+         for (i = 0; i < len; i++) {
+-                fprintf_filtered(gdb_stdout, "  %s",
+-                        TYPE_FIELD_NAME (type, i));
+-                if (lastval != TYPE_FIELD_ENUMVAL (type, i)) {
+-                        fprintf_filtered (gdb_stdout, " = %s",
+-                                plongest(TYPE_FIELD_ENUMVAL (type, i)));
+-                        lastval = TYPE_FIELD_ENUMVAL (type, i);
+-                } else
++                if (print)
++                        fprintf_filtered(gdb_stdout, "  %s", TYPE_FIELD_NAME 
(type, i));
++                lastval = TYPE_FIELD_ENUMVAL (type, i);
++                if (print) {
+                         fprintf_filtered(gdb_stdout, " = %s", 
plongest(lastval));
+-                fprintf_filtered(gdb_stdout, "\n");
+-                lastval++;
++                        fprintf_filtered(gdb_stdout, "\n");
++                } else if (req->tcb)
++                        req->tcb(EOP_ENUMVAL, req, TYPE_FIELD_NAME (type, i), 
&lastval, 0, 0);
++        }
++        if (print) {
++                if (TYPE_TAG_NAME(type))
++                        fprintf_filtered(gdb_stdout, "};\n");
++                else
++                        fprintf_filtered(gdb_stdout, "} %s;\n", req->name);
+         }
+-        if (TYPE_TAG_NAME(type))
+-                fprintf_filtered(gdb_stdout, "};\n");
+-        else
+-                fprintf_filtered(gdb_stdout, "} %s;\n", req->name);
+ }
+ 
+ /*
+@@ -7320,26 +7396,43 @@
+         }
+ 
+         for (i = 0; i < nfields; i++) {
+-                if (STREQ(req->member, nextfield->name)) {
+-                        req->member_offset = offset + nextfield->loc.bitpos;
+-                        req->member_length = TYPE_LENGTH(nextfield->type());
+-                        req->member_typecode = TYPE_CODE(nextfield->type());
+-                        req->member_main_type_name = (char 
*)TYPE_NAME(nextfield->type());
+-                        req->member_main_type_tag_name = (char 
*)TYPE_TAG_NAME(nextfield->type());
+-                        target_type = TYPE_TARGET_TYPE(nextfield->type());
+-                        if (target_type) {
+-                                req->member_target_type_name = (char 
*)TYPE_NAME(target_type);
+-                                req->member_target_type_tag_name = (char 
*)TYPE_TAG_NAME(target_type);
+-                        }
+-                        if ((req->member_typecode == TYPE_CODE_TYPEDEF) &&
+-                            (typedef_type = check_typedef(nextfield->type())))
+-                                req->member_length = 
TYPE_LENGTH(typedef_type);
+-                        return;
+-                } else if (*nextfield->name == 0) { /* Anonymous struct/union 
*/
++                if (*nextfield->name == 0) { /* Anonymous struct/union */
+                         get_member_data(req, nextfield->type(),
+                             offset + nextfield->loc.bitpos, 0);
+                         if (req->member_offset != -1)
+                                 return;
++                } else {
++                        /* callback may be just looking for a specific member 
name */
++                        if (req->tcb) {
++                                if (req->tcb(EOP_MEMBER_NAME, req, 
nextfield->name, 0, 0, 0)) {
++                                        long bitpos = 
FIELD_BITPOS(*nextfield);
++                                        long bitsize = 
FIELD_BITSIZE(*nextfield);
++                                        long len = 
TYPE_LENGTH(nextfield->type());
++                                        long byteOffset;
++                                        offset += nextfield->loc.bitpos;
++                                        byteOffset = offset/8;
++                                        console("EOP_MEMBER_SIZES\n");
++                                        req->tcb(EOP_MEMBER_SIZES, req, 
&byteOffset, &len, &bitpos, &bitsize);
++                                        /* callback with full type info */
++                                        drillDownType(req, nextfield->type());
++                                }
++                        } else if (STREQ(req->member, nextfield->name)) {
++                                req->member_offset = offset + 
nextfield->loc.bitpos;
++                                req->member_length = 
TYPE_LENGTH(nextfield->type());
++                                req->member_typecode = 
TYPE_CODE(nextfield->type());
++                                req->member_main_type_name = (char 
*)TYPE_NAME(nextfield->type());
++                                req->member_main_type_tag_name = (char 
*)TYPE_TAG_NAME(nextfield->type());
++                                target_type = 
TYPE_TARGET_TYPE(nextfield->type());
++                                if (target_type) {
++                                        req->member_target_type_name = (char 
*)TYPE_NAME(target_type);
++                                        req->member_target_type_tag_name = 
(char *)TYPE_TAG_NAME(target_type);
++                                }
++                                if ((req->member_typecode == 
TYPE_CODE_TYPEDEF) &&
++                                    (typedef_type = 
check_typedef(nextfield->type()))) {
++                                        req->member_length = 
TYPE_LENGTH(typedef_type);
++                                }
++                                return;
++                        }
+                 }
+                 nextfield++;
+         }

++++++ 
crash-SLE15-SP1-Fix-for-PPC64-kernel-virtual-address-translation-in.patch ++++++
--- /var/tmp/diff_new_pack.LTyitD/_old  2023-04-14 13:13:54.731850051 +0200
+++ /var/tmp/diff_new_pack.LTyitD/_new  2023-04-14 13:13:54.735850074 +0200
@@ -28,13 +28,13 @@
 @@ -519,8 +519,9 @@ ppc64_init(int when)
  
                                        if (THIS_KERNEL_VERSION >= 
LINUX(4,12,0)) {
-                                               m->l2_index_size = 
PMD_INDEX_SIZE_L4_64K_4_12;
+                                               ms->l2_index_size = 
PMD_INDEX_SIZE_L4_64K_4_12;
 -                                              if (THIS_KERNEL_VERSION >= 
LINUX(4,17,0))
--                                                      m->l3_index_size = 
PUD_INDEX_SIZE_L4_64K_4_17;
+-                                                      ms->l3_index_size = 
PUD_INDEX_SIZE_L4_64K_4_17;
 +                                              if (THIS_KERNEL_VERSION >= 
LINUX(4,17,0) ||
 +                                                      is_SLE15SP1())
-+                                                              
m->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_17;
++                                                              
ms->l3_index_size = PUD_INDEX_SIZE_L4_64K_4_17;
                                                else
-                                                       m->l3_index_size = 
PUD_INDEX_SIZE_L4_64K_4_12;
-                                               m->l4_index_size = 
PGD_INDEX_SIZE_L4_64K_4_12;
+                                                       ms->l3_index_size = 
PUD_INDEX_SIZE_L4_64K_4_12;
+                                               ms->l4_index_size = 
PGD_INDEX_SIZE_L4_64K_4_12;
 

++++++ crash-extensions-rule-for-defs.patch ++++++
--- /var/tmp/diff_new_pack.LTyitD/_old  2023-04-14 13:13:54.755850188 +0200
+++ /var/tmp/diff_new_pack.LTyitD/_new  2023-04-14 13:13:54.759850211 +0200
@@ -10,5 +10,5 @@
 +
  $(CONTRIB_SO): %.so: %.c defs.h
        @if [ -f $*.mk ]; then \
-               make -f $*.mk; \
+               $(MAKE) -f $*.mk; \
 


++++++ crash-patch-gdb.patch ++++++
--- /var/tmp/diff_new_pack.LTyitD/_old  2023-04-14 13:13:54.787850371 +0200
+++ /var/tmp/diff_new_pack.LTyitD/_new  2023-04-14 13:13:54.787850371 +0200
@@ -16,18 +16,16 @@
 
 --- a/Makefile
 +++ b/Makefile
-@@ -263,8 +263,11 @@ gdb_unzip:
+@@ -263,6 +263,11 @@ gdb_unzip:
  gdb_patch:
        if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ]; then \
                patch -p0 < ${GDB}.patch; cp ${GDB}.patch ${GDB}; fi
--      if [ "${ARCH}" = "ppc64le" ] && [ -f ${GDB}-ppc64le-support.patch ]; 
then \
--              patch -d ${GDB} -p1 -F0 < ${GDB}-ppc64le-support.patch ; \
-+      patch -d ${GDB} -p1 -F0 < ${GDB}-ppc64le-support.patch ; \
 +      if [ -f ${GDB}.series ]; then \
 +              while read p; do \
 +                      patch -d ${GDB} -p1 -F0 < "$$p" ; \
 +              done < ${GDB}.series ; \
-       fi
-       if [ "${ARCH}" = "x86_64" ] && [ "${TARGET}" = "PPC64" ] && [ -f 
${GDB}-ppc64le-support.patch ]; then \
-               patch -d ${GDB} -p1 -F0 < ${GDB}-ppc64le-support.patch ; \
++      fi
+ 
+ library: ${OBJECT_FILES}
+       ar -rs ${PROGRAM}lib.a ${OBJECT_FILES}
 

++++++ gdb-7.6.tar.gz -> gdb-10.2.tar.gz ++++++
/work/SRC/openSUSE:Factory/crash/gdb-7.6.tar.gz 
/work/SRC/openSUSE:Factory/.crash.new.19717/gdb-10.2.tar.gz differ: char 5, 
line 1

Reply via email to