Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb fix ppc



details:   https://anonhg.NetBSD.org/src/rev/dbc938f4f6be
branches:  trunk
changeset: 451684:dbc938f4f6be
user:      christos <christos%NetBSD.org@localhost>
date:      Thu May 30 21:27:58 2019 +0000

description:
fix ppc

diffstat:

 external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c                         |    22 +-
 external/gpl3/gdb/dist/sim/ppc/emul_netbsd.c                      |     1 +
 external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd-in3.h               |  1415 +++++----
 external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd.h                   |  1415 +++++----
 external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd_stdint.h            |     6 +-
 external/gpl3/gdb/lib/libbfd/arch/powerpc/bfdver.h                |    28 +-
 external/gpl3/gdb/lib/libbfd/arch/powerpc/config.h                |    34 +-
 external/gpl3/gdb/lib/libbfd/arch/powerpc/defs.mk                 |    10 +-
 external/gpl3/gdb/lib/libbfd/arch/powerpc/targmatch.h             |   917 +-----
 external/gpl3/gdb/lib/libbfd/arch/powerpc64/bfd-in3.h             |  1415 +++++----
 external/gpl3/gdb/lib/libbfd/arch/powerpc64/bfd.h                 |  1415 +++++----
 external/gpl3/gdb/lib/libbfd/arch/powerpc64/bfd_stdint.h          |     6 +-
 external/gpl3/gdb/lib/libbfd/arch/powerpc64/bfdver.h              |    28 +-
 external/gpl3/gdb/lib/libbfd/arch/powerpc64/config.h              |    34 +-
 external/gpl3/gdb/lib/libbfd/arch/powerpc64/defs.mk               |    10 +-
 external/gpl3/gdb/lib/libbfd/arch/powerpc64/targmatch.h           |   917 +-----
 external/gpl3/gdb/lib/libbfd/arch/sh3el/bfd-in3.h                 |  1417 +++++----
 external/gpl3/gdb/lib/libbfd/arch/sh3el/bfd.h                     |  1417 +++++----
 external/gpl3/gdb/lib/libbfd/arch/sh3el/bfd_stdint.h              |     6 +-
 external/gpl3/gdb/lib/libbfd/arch/sh3el/bfdver.h                  |    28 +-
 external/gpl3/gdb/lib/libbfd/arch/sh3el/config.h                  |    34 +-
 external/gpl3/gdb/lib/libbfd/arch/sh3el/defs.mk                   |    12 +-
 external/gpl3/gdb/lib/libbfd/arch/sh3el/targmatch.h               |   917 +-----
 external/gpl3/gdb/lib/libdecnumber/arch/powerpc/config.h          |    14 +-
 external/gpl3/gdb/lib/libdecnumber/arch/powerpc/gstdint.h         |     6 +-
 external/gpl3/gdb/lib/libdecnumber/arch/powerpc64/config.h        |    14 +-
 external/gpl3/gdb/lib/libdecnumber/arch/powerpc64/gstdint.h       |     6 +-
 external/gpl3/gdb/lib/libdecnumber/arch/sh3el/config.h            |    14 +-
 external/gpl3/gdb/lib/libdecnumber/arch/sh3el/gstdint.h           |     6 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc/build-gnulib/config.h   |   511 +++-
 external/gpl3/gdb/lib/libgdb/arch/powerpc/config.h                |   128 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc/defs.mk                 |     8 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc/init.c                  |   136 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc/jit-reader.h            |     6 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc/version.c               |     8 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc/xml-builtin.c           |    24 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc64/build-gnulib/config.h |   513 +++-
 external/gpl3/gdb/lib/libgdb/arch/powerpc64/config.h              |   128 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc64/defs.mk               |     8 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc64/init.c                |   142 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc64/jit-reader.h          |     6 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc64/version.c             |     8 +-
 external/gpl3/gdb/lib/libgdb/arch/powerpc64/xml-builtin.c         |    24 +-
 external/gpl3/gdb/lib/libgdb/arch/sh3el/build-gnulib/config.h     |   511 +++-
 external/gpl3/gdb/lib/libgdb/arch/sh3el/config.h                  |   128 +-
 external/gpl3/gdb/lib/libgdb/arch/sh3el/defs.mk                   |     8 +-
 external/gpl3/gdb/lib/libgdb/arch/sh3el/init.c                    |   130 +-
 external/gpl3/gdb/lib/libgdb/arch/sh3el/jit-reader.h              |     6 +-
 external/gpl3/gdb/lib/libgdb/arch/sh3el/version.c                 |     8 +-
 external/gpl3/gdb/lib/libgdb/arch/sh3el/xml-builtin.c             |    24 +-
 external/gpl3/gdb/lib/libiberty/arch/powerpc/config.h             |    12 +-
 external/gpl3/gdb/lib/libiberty/arch/powerpc64/config.h           |    12 +-
 external/gpl3/gdb/lib/libiberty/arch/sh3el/config.h               |    12 +-
 external/gpl3/gdb/lib/libopcodes/arch/powerpc/config.h            |    10 +-
 external/gpl3/gdb/lib/libopcodes/arch/powerpc64/config.h          |    10 +-
 external/gpl3/gdb/lib/libopcodes/arch/sh3el/config.h              |    10 +-
 external/gpl3/gdb/lib/libreadline/arch/powerpc/config.h           |    14 +-
 external/gpl3/gdb/lib/libreadline/arch/powerpc64/config.h         |    14 +-
 external/gpl3/gdb/lib/libreadline/arch/sh3el/config.h             |    14 +-
 external/gpl3/gdb/lib/libsim/arch/powerpc/build-config.h          |    12 +-
 external/gpl3/gdb/lib/libsim/arch/powerpc/config.h                |    12 +-
 external/gpl3/gdb/lib/libsim/arch/powerpc64/build-config.h        |    12 +-
 external/gpl3/gdb/lib/libsim/arch/powerpc64/config.h              |    12 +-
 63 files changed, 7558 insertions(+), 6627 deletions(-)

diffs (truncated from 25621 to 300 lines):

diff -r 033a1193d0e9 -r dbc938f4f6be external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c Thu May 30 21:23:52 2019 +0000
+++ b/external/gpl3/gdb/dist/gdb/ppc-nbsd-nat.c Thu May 30 21:27:58 2019 +0000
@@ -169,20 +169,20 @@
   if (pcb->pcb_sp == 0)
     return 0;
 
-  read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof sf);
-  regcache->raw_supply (tdep->ppc_cr_regnum, &sf.cr);
-  regcache->raw_supply (tdep->ppc_gp0_regnum + 2, &sf.fixreg2);
+  read_memory (pcb->pcb_sp, (gdb_byte *)&sf, sizeof(sf));
+  regcache->raw_supply (tdep->ppc_cr_regnum, &sf.sf_cr);
+  regcache->raw_supply (tdep->ppc_gp0_regnum + 2, &sf.sf_fixreg2);
   for (i = 0 ; i < 19 ; i++)
-    regcache->raw_supply (tdep->ppc_gp0_regnum + 13 + i, &sf.fixreg[i]);
+    regcache->raw_supply (tdep->ppc_gp0_regnum + 13 + i, &sf.sf_fixreg[i]);
 
-  read_memory(sf.sp, (gdb_byte *)&cf, sizeof(cf));
-  regcache->raw_supply (tdep->ppc_gp0_regnum + 30, &cf.r30);
-  regcache->raw_supply (tdep->ppc_gp0_regnum + 31, &cf.r31);
-  regcache->raw_supply (tdep->ppc_gp0_regnum + 1, &cf.sp);
+  read_memory(sf.sf_sp, (gdb_byte *)&cf, sizeof(cf));
+  regcache->raw_supply (tdep->ppc_gp0_regnum + 30, &cf.cf_r30);
+  regcache->raw_supply (tdep->ppc_gp0_regnum + 31, &cf.cf_r31);
+  regcache->raw_supply (tdep->ppc_gp0_regnum + 1, &cf.cf_sp);
 
-  read_memory(cf.sp, (gdb_byte *)&cf, sizeof(cf));
-  regcache->raw_supply (tdep->ppc_lr_regnum, &cf.lr);
-  regcache->raw_supply (gdbarch_pc_regnum (gdbarch), &cf.lr);
+  read_memory(cf.cf_sp, (gdb_byte *)&cf, sizeof(cf));
+  regcache->raw_supply (tdep->ppc_lr_regnum, &cf.cf_lr);
+  regcache->raw_supply (gdbarch_pc_regnum (gdbarch), &cf.cf_lr);
 
   return 1;
 }
diff -r 033a1193d0e9 -r dbc938f4f6be external/gpl3/gdb/dist/sim/ppc/emul_netbsd.c
--- a/external/gpl3/gdb/dist/sim/ppc/emul_netbsd.c      Thu May 30 21:23:52 2019 +0000
+++ b/external/gpl3/gdb/dist/sim/ppc/emul_netbsd.c      Thu May 30 21:27:58 2019 +0000
@@ -41,6 +41,7 @@
 #include <stdio.h>
 #include <signal.h>
 #include <fcntl.h>
+#include <dirent.h>
 #include <errno.h>
 #include <sys/param.h>
 #include <sys/time.h>
diff -r 033a1193d0e9 -r dbc938f4f6be external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd-in3.h
--- a/external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd-in3.h       Thu May 30 21:23:52 2019 +0000
+++ b/external/gpl3/gdb/lib/libbfd/arch/powerpc/bfd-in3.h       Thu May 30 21:27:58 2019 +0000
@@ -1,17 +1,17 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gdb,v 1.7 2016/10/16 04:37:42 mrg Exp  */
-/* Generated from: NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp  */
-
-/* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically 
-   generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c", 
-   "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c", 
-   "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c", 
+/* Generated from: NetBSD: mknative-gdb,v 1.8 2019/05/29 01:56:06 christos Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
+
+/* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically
+   generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
+   "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
+   "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
    "linker.c", "simple.c" and "compress.c".
    Run "make headers" in your build bfd/ to regenerate.  */
 
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright (C) 1990-2017 Free Software Foundation, Inc.
+   Copyright (C) 1990-2019 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
 
@@ -45,6 +45,8 @@
 
 #include "ansidecl.h"
 #include "symcat.h"
+#include "bfd_stdint.h"
+#include "diagnostics.h"
 #include <stdarg.h>
 #include <sys/stat.h>
 
@@ -102,6 +104,24 @@
 typedef BFD_HOST_U_64_BIT bfd_uint64_t;
 #endif
 
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if BFD_HOST_64BIT_LONG
+#  define BFD_PRI64 "l"
+# elif defined (__MSVCRT__)
+#  define BFD_PRI64 "I64"
+# else
+#  define BFD_PRI64 "ll"
+# endif
+# undef PRId64
+# define PRId64 BFD_PRI64 "d"
+# undef PRIu64
+# define PRIu64 BFD_PRI64 "u"
+# undef PRIx64
+# define PRIx64 BFD_PRI64 "x"
+#endif
+
 #if BFD_ARCH_SIZE >= 64
 #define BFD64
 #endif
@@ -115,7 +135,7 @@
 #endif
 
 /* Declaring a type wide enough to hold a host long and a host pointer.  */
-#define BFD_HOSTPTR_T  unsigned long
+#define BFD_HOSTPTR_T unsigned long
 typedef BFD_HOSTPTR_T bfd_hostptr_t;
 
 /* Forward declaration.  */
@@ -226,9 +246,6 @@
 /* A count of carsyms (canonical archive symbols).  */
 typedef unsigned long symindex;
 
-/* How to perform a relocation.  */
-typedef const struct reloc_howto_struct reloc_howto_type;
-
 #define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
 
 /* General purpose part of a symbol X;
@@ -258,7 +275,7 @@
 
 /* Used in generating armaps (archive tables of contents).
    Perhaps just a forward definition would do?  */
-struct orl                     /* Output ranlib.  */
+struct orl             /* Output ranlib.  */
 {
   char **name;         /* Symbol name.  */
   union
@@ -276,7 +293,7 @@
   union
   {
     struct bfd_symbol *sym;    /* Function name.  */
-    bfd_vma offset;                    /* Offset into section.  */
+    bfd_vma offset;            /* Offset into section.  */
   } u;
 }
 alent;
@@ -340,11 +357,11 @@
 {
   symvalue value;
   char type;
-  const char *name;            /* Symbol name.  */
-  unsigned char stab_type;     /* Stab type.  */
-  char stab_other;             /* Stab other.  */
-  short stab_desc;             /* Stab desc.  */
-  const char *stab_name;       /* String for stab type.  */
+  const char *name;            /* Symbol name.  */
+  unsigned char stab_type;     /* Stab type.  */
+  char stab_other;             /* Stab other.  */
+  short stab_desc;             /* Stab desc.  */
+  const char *stab_name;       /* String for stab type.  */
 } symbol_info;
 
 /* Get the name of a stabs type code.  */
@@ -382,7 +399,7 @@
      only if the argument is NULL.  */
   struct bfd_hash_entry *(*newfunc)
     (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-   /* An objalloc for this hash table.  This is a struct objalloc *,
+  /* An objalloc for this hash table.  This is a struct objalloc *,
      but we use void * to avoid requiring the inclusion of objalloc.h.  */
   void *memory;
   /* The number of slots in the hash table.  */
@@ -500,7 +517,7 @@
   (_bfd_warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),        \
    bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)                          \
-  (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),       \
+  (_bfd_warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
    bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
 #else
 #define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)                           \
@@ -574,6 +591,8 @@
 void bfd_putl64 (bfd_uint64_t, void *);
 void bfd_putb32 (bfd_vma, void *);
 void bfd_putl32 (bfd_vma, void *);
+void bfd_putb24 (bfd_vma, void *);
+void bfd_putl24 (bfd_vma, void *);
 void bfd_putb16 (bfd_vma, void *);
 void bfd_putl16 (bfd_vma, void *);
 
@@ -601,8 +620,6 @@
 
 /* Externally visible ECOFF routines.  */
 
-extern bfd_vma bfd_ecoff_get_gp_value
-  (bfd * abfd);
 extern bfd_boolean bfd_ecoff_set_gp_value
   (bfd *abfd, bfd_vma gp_value);
 extern bfd_boolean bfd_ecoff_set_regmasks
@@ -771,8 +788,6 @@
 
 extern bfd_boolean bfd_i386linux_size_dynamic_sections
   (bfd *, struct bfd_link_info *);
-extern bfd_boolean bfd_m68klinux_size_dynamic_sections
-  (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_sparclinux_size_dynamic_sections
   (bfd *, struct bfd_link_info *);
 
@@ -841,9 +856,6 @@
 extern bfd_boolean bfd_coff_set_symbol_class
   (bfd *, struct bfd_symbol *, unsigned int);
 
-extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
-  (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
-
 /* ARM VFP11 erratum workaround support.  */
 typedef enum
 {
@@ -946,7 +958,7 @@
 /* ELF ARM mapping symbol support.  */
 #define BFD_ARM_SPECIAL_SYM_TYPE_MAP   (1 << 0)
 #define BFD_ARM_SPECIAL_SYM_TYPE_TAG   (1 << 1)
-#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER  (1 << 2)
+#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
 #define BFD_ARM_SPECIAL_SYM_TYPE_ANY   (~0)
 
 extern bfd_boolean bfd_is_arm_special_symbol_name
@@ -1060,9 +1072,25 @@
 /* MIPS ABI flags data access.  For the disassembler.  */
 struct elf_internal_abiflags_v0;
 extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *);
+
+/* C-SKY functions.  */
+extern bfd_boolean elf32_csky_build_stubs
+  (struct bfd_link_info *);
+extern bfd_boolean elf32_csky_size_stubs
+  (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
+   struct bfd_section *(*) (const char*, struct bfd_section*),
+   void (*) (void));
+extern void elf32_csky_next_input_section
+  (struct bfd_link_info *, struct bfd_section *);
+extern int elf32_csky_setup_section_lists
+  (bfd *, struct bfd_link_info *);
 /* Extracted from init.c.  */
-void bfd_init (void);
-
+unsigned int bfd_init (void);
+
+
+/* Value returned by bfd_init.  */
+
+#define BFD_INIT_MAGIC (sizeof (struct bfd_section))
 /* Extracted from opncls.c.  */
 /* Set to N to open the next N BFDs using an alternate id space.  */
 extern unsigned int bfd_use_reserved_id;
@@ -1150,6 +1178,20 @@
 #define bfd_get_signed_16(abfd, ptr) \
   BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
 
+#define bfd_put_24(abfd, val, ptr) \
+  do                                   \
+    if (bfd_big_endian (abfd))         \
+      bfd_putb24 ((val), (ptr));       \
+    else                               \
+      bfd_putl24 ((val), (ptr));       \
+  while (0)
+
+bfd_vma bfd_getb24 (const void *p);
+bfd_vma bfd_getl24 (const void *p);
+
+#define bfd_get_24(abfd, ptr) \
+  (bfd_big_endian (abfd) ? bfd_getb24 (ptr) : bfd_getl24 (ptr))
+
 #define bfd_put_32(abfd, val, ptr) \
   BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
 #define bfd_put_signed_32 \
@@ -1177,9 +1219,9 @@
 
 #define bfd_put(bits, abfd, val, ptr)                  \
   ((bits) == 8 ? bfd_put_8  (abfd, val, ptr)           \
-   : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)                \
-   : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)                \
-   : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)                \
+   : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)        \
+   : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)        \
+   : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)        \
    : (abort (), (void) 0))
 
 
@@ -1244,7 +1286,9 @@
 /* Extracted from bfdio.c.  */
 long bfd_get_mtime (bfd *abfd);
 
-file_ptr bfd_get_size (bfd *abfd);
+ufile_ptr bfd_get_size (bfd *abfd);
+
+ufile_ptr bfd_get_file_size (bfd *abfd);
 
 void *bfd_mmap (bfd *abfd, void *addr, bfd_size_type len,
     int prot, int flags, file_ptr offset,



Home | Main Index | Thread Index | Old Index