Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Dec 2016 16:08:14 +0000 (UTC)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r428876 - in head/devel/gdb: . files files/kgdb
Message-ID:  <201612181608.uBIG8Emn051174@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tijl
Date: Sun Dec 18 16:08:14 2016
New Revision: 428876
URL: https://svnweb.freebsd.org/changeset/ports/428876

Log:
  Update to 7.12.
  
  PR:		214927
  Submitted by:	luca.pizzamiglio@gmail.com (maintainer)

Added:
  head/devel/gdb/files/patch-fixes   (contents, props changed)
  head/devel/gdb/files/patch-gdb-gnulib-import-stddef.in.h   (contents, props changed)
  head/devel/gdb/files/patch-gdb-x86bsd-nat.c   (contents, props changed)
  head/devel/gdb/files/patch-nowarning   (contents, props changed)
Deleted:
  head/devel/gdb/files/commit-0064d22
  head/devel/gdb/files/commit-21002a6
  head/devel/gdb/files/commit-2c5c2a3
  head/devel/gdb/files/commit-2faa344
  head/devel/gdb/files/commit-3350c5f
  head/devel/gdb/files/commit-5077bff
  head/devel/gdb/files/commit-5fa14c6
  head/devel/gdb/files/commit-7697fc9
  head/devel/gdb/files/commit-82372b2
  head/devel/gdb/files/commit-8607ea6
  head/devel/gdb/files/commit-a3405d1
  head/devel/gdb/files/commit-aa1ed4a
  head/devel/gdb/files/commit-b00f86d
  head/devel/gdb/files/commit-bb2a62e
  head/devel/gdb/files/commit-bc7b765
  head/devel/gdb/files/commit-da95a26
  head/devel/gdb/files/commit-dbaed38
  head/devel/gdb/files/commit-e6cdd38
  head/devel/gdb/files/commit-ee95032
Modified:
  head/devel/gdb/Makefile
  head/devel/gdb/distinfo
  head/devel/gdb/files/extrapatch-kgdb
  head/devel/gdb/files/kgdb/amd64fbsd-kern.c
  head/devel/gdb/files/kgdb/fbsd-kld.c
  head/devel/gdb/files/kgdb/fbsd-kthr.c
  head/devel/gdb/files/kgdb/fbsd-kvm.c
  head/devel/gdb/files/kgdb/i386fbsd-kern.c
  head/devel/gdb/files/kgdb/kgdb-main.c
  head/devel/gdb/files/kgdb/ppcfbsd-kern.c
  head/devel/gdb/files/kgdb/sparc64fbsd-kern.c
  head/devel/gdb/files/patch-gdb-configure
  head/devel/gdb/pkg-plist

Modified: head/devel/gdb/Makefile
==============================================================================
--- head/devel/gdb/Makefile	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/Makefile	Sun Dec 18 16:08:14 2016	(r428876)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	gdb
-PORTVERSION=	7.11.1
-PORTREVISION=	3
+PORTVERSION=	7.12
 CATEGORIES=	devel
 MASTER_SITES=	GNU
 
@@ -25,39 +24,22 @@ CONFIGURE_ARGS=	--program-suffix=${PORTV
 		--with-gdb-datadir=${PREFIX}/share/gdb${PORTVERSION:S/.//g} \
 		--with-separate-debug-dir=/usr/lib/debug \
 		${ICONV_CONFIGURE_ARG} \
+		--with-expat=yes --with-libexpat-prefix=${LOCALBASE}/lib \
 		--without-libunwind-ia64
 CFLAGS:=	${CFLAGS:C/ +$//}	# blanks at EOL creep in sometimes
 CFLAGS+=	-DRL_NO_COMPAT -Wno-unused-function -Wno-unused-variable
 EXCLUDE=	dejagnu expect sim texinfo intl
 EXTRACT_AFTER_ARGS=	${EXCLUDE:S/^/--exclude /}
-EXTRA_PATCHES=	${FILESDIR}/commit-21002a6 \
-		${FILESDIR}/commit-b00f86d \
-		${FILESDIR}/commit-aa1ed4a \
-		${FILESDIR}/commit-7697fc9 \
-		${FILESDIR}/commit-3350c5f \
-		${FILESDIR}/commit-2faa344 \
-		${FILESDIR}/commit-82372b2 \
-		${FILESDIR}/commit-e6cdd38 \
-		${FILESDIR}/commit-a3405d1 \
-		${FILESDIR}/commit-5077bff \
-		${FILESDIR}/commit-bb2a62e \
-		${FILESDIR}/commit-8607ea6 \
-		${FILESDIR}/commit-2c5c2a3 \
-		${FILESDIR}/commit-ee95032 \
-		${FILESDIR}/commit-bc7b765 \
-		${FILESDIR}/commit-0064d22 \
-		${FILESDIR}/commit-da95a26 \
-		${FILESDIR}/commit-5fa14c6 \
-		${FILESDIR}/commit-dbaed38
+LIB_DEPENDS+=	libexpat.so:textproc/expat2
 
 VER=		${PORTVERSION:S/.//g}
 PLIST_SUB=	VER=${VER}
 
 ONLY_FOR_ARCHS=	i386 amd64 powerpc powerpc64 armv6	# untested elsewhere, might work
 
-OPTIONS_DEFINE=	DEBUG EXPAT GDB_LINK GUILE KGDB PYTHON TUI
+OPTIONS_DEFINE=	DEBUG GDB_LINK GUILE KGDB PYTHON TUI
 
-OPTIONS_DEFAULT=	EXPAT GDB_LINK KGDB PYTHON TUI PORT_READLINE
+OPTIONS_DEFAULT=	GDB_LINK KGDB PYTHON TUI PORT_READLINE
 
 OPTIONS_SINGLE=	READLINE
 OPTIONS_SINGLE_READLINE=	BASE_READLINE BUNDLED_READLINE PORT_READLINE
@@ -76,8 +58,6 @@ BASE_READLINE_CFLAGS=	-D_rl_echoing_p=re
 BASE_READLINE_EXTRA_PATCHES=	${FILESDIR}/extrapatch-base-readline
 BUNDLED_READLINE_CONFIGURE_OFF=	--with-system-readline
 DEBUG_CFLAGS=		-g
-EXPAT_CONFIGURE_WITH=	expat
-EXPAT_LIB_DEPENDS=	libexpat.so:textproc/expat2
 GUILE_CONFIGURE_WITH=	guile
 GUILE_USES=		pkgconfig
 GUILE_LIB_DEPENDS=	libguile-2.0.so:lang/guile2
@@ -94,6 +74,11 @@ TUI_CONFIGURE_ENABLE=	tui
 CFLAGS+=	-DSIGLIBRT=33
 .endif
 
+.if ${OSVERSION} > 1000010
+# The option -Wno-extended-offsetof is supported by clang only
+CFLAGS+=	-Wno-extended-offsetof
+.endif
+
 .if ! ${PORT_OPTIONS:MBUNDLED_READLINE}
 EXCLUDE+=	readline
 .endif
@@ -115,6 +100,8 @@ do-install:
 		${STAGEDIR}${PREFIX}/bin/gdb${VER}
 	${INSTALL_MAN} ${WRKSRC}/gdb/doc/gdb.1 \
 		${STAGEDIR}${MAN1PREFIX}/man/man1/gdb${VER}.1
+	(cd ${WRKSRC}/gdb/data-directory ; \
+		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-syscalls )
 
 do-install-KGDB-on:
 	${INSTALL_PROGRAM} ${WRKSRC}/gdb/kgdb \
@@ -123,10 +110,6 @@ do-install-KGDB-on:
 do-install-TUI-on:
 	${LN} -sf gdb${VER} ${STAGEDIR}${PREFIX}/bin/gdbtui${VER}
 
-do-install-EXPAT-on:
-	(cd ${WRKSRC}/gdb/data-directory ; \
-		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install-syscalls )
-
 do-install-GDB_LINK-on:
 	${LN} -sf gdb${VER} ${STAGEDIR}${PREFIX}/bin/gdb
 .if ${PORT_OPTIONS:MKGDB}

Modified: head/devel/gdb/distinfo
==============================================================================
--- head/devel/gdb/distinfo	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/distinfo	Sun Dec 18 16:08:14 2016	(r428876)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1464770611
-SHA256 (gdb-7.11.1.tar.xz) = e9216da4e3755e9f414c1aa0026b626251dfc57ffe572a266e98da4f6988fc70
-SIZE (gdb-7.11.1.tar.xz) = 18947760
+TIMESTAMP = 1480413713
+SHA256 (gdb-7.12.tar.xz) = 834ff3c5948b30718343ea57b11cbc3235d7995c6a4f3a5cecec8c8114164f94
+SIZE (gdb-7.12.tar.xz) = 19219556

Modified: head/devel/gdb/files/extrapatch-kgdb
==============================================================================
--- head/devel/gdb/files/extrapatch-kgdb	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/files/extrapatch-kgdb	Sun Dec 18 16:08:14 2016	(r428876)
@@ -194,22 +194,22 @@ index ccdab18..499944f 100644
    GDB_OSABI_NETBSD_ELF,
    GDB_OSABI_OPENBSD_ELF,
 diff --git gdb/osabi.c gdb/osabi.c
-index 3581eb3..d12656e 100644
+index f7d4e74..130ffef 100644
 --- gdb/osabi.c
 +++ gdb/osabi.c
 @@ -66,6 +66,7 @@ static const struct osabi_names gdb_osabi_names[] =
    { "GNU/Linux", "linux(-gnu)?" },
-   { "FreeBSD a.out", NULL },
-   { "FreeBSD ELF", NULL },
-+  { "FreeBSD ELF kernel", NULL },
-   { "NetBSD a.out", NULL },
-   { "NetBSD ELF", NULL },
-   { "OpenBSD ELF", NULL },
+   { "FreeBSD/a.out", NULL },
+   { "FreeBSD/ELF", NULL },
++  { "FreeBSD/kernel", NULL },
+   { "NetBSD/a.out", NULL },
+   { "NetBSD/ELF", NULL },
+   { "OpenBSD/ELF", NULL },
 diff --git gdb/regcache.c gdb/regcache.c
-index 86e648a..26a0fd5 100644
+index a5c90a6..05044e5 100644
 --- gdb/regcache.c
 +++ gdb/regcache.c
-@@ -1065,6 +1065,20 @@ regcache_raw_supply (struct regcache *regcache, int regnum, const void *buf)
+@@ -1083,6 +1083,20 @@ regcache_raw_supply (struct regcache *regcache, int regnum, const void *buf)
      }
  }
  
@@ -217,11 +217,11 @@ index 86e648a..26a0fd5 100644
 +regcache_raw_supply_unsigned (struct regcache *regcache, int regnum,
 +			      ULONGEST val)
 +{
-+  void *buf;
++  gdb_byte *buf;
 +
 +  gdb_assert (regcache != NULL);
 +  gdb_assert (regnum >=0 && regnum < regcache->descr->nr_raw_registers);
-+  buf = alloca (regcache->descr->sizeof_register[regnum]);
++  buf = (gdb_byte *)alloca (regcache->descr->sizeof_register[regnum]);
 +  store_unsigned_integer (buf, regcache->descr->sizeof_register[regnum],
 +			  gdbarch_byte_order (regcache->descr->gdbarch), val);
 +  regcache_raw_supply (regcache, regnum, buf);

Modified: head/devel/gdb/files/kgdb/amd64fbsd-kern.c
==============================================================================
--- head/devel/gdb/files/kgdb/amd64fbsd-kern.c	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/files/kgdb/amd64fbsd-kern.c	Sun Dec 18 16:08:14 2016	(r428876)
@@ -135,7 +135,7 @@ amd64fbsd_trapframe_cache (struct frame_
   int i;
 
   if (*this_cache != NULL)
-    return (*this_cache);
+    return ((struct trad_frame_cache *)*this_cache);
 
   cache = trad_frame_cache_zalloc (this_frame);
   *this_cache = cache;

Modified: head/devel/gdb/files/kgdb/fbsd-kld.c
==============================================================================
--- head/devel/gdb/files/kgdb/fbsd-kld.c	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/files/kgdb/fbsd-kld.c	Sun Dec 18 16:08:14 2016	(r428876)
@@ -69,7 +69,7 @@ static const struct program_space_data *
 static void
 kld_pspace_data_cleanup (struct program_space *pspace, void *arg)
 {
-  struct kld_info *info = arg;
+  struct kld_info *info = (struct kld_info *)arg;
 
   xfree (info);
 }
@@ -82,7 +82,8 @@ get_kld_info (void)
 {
   struct kld_info *info;
 
-  info = program_space_data (current_program_space, kld_pspace_data);
+  info = (struct kld_info *)
+    program_space_data (current_program_space, kld_pspace_data);
   if (info != NULL)
     return info;
 
@@ -437,7 +438,7 @@ kld_special_symbol_handling (void)
 static struct so_list *
 kld_current_sos (void)
 {
-	struct so_list *head, **prev, *new;
+	struct so_list *head, **prev, *newobj;
 	struct kld_info *info;
 	CORE_ADDR kld, kernel;
 	char *path;
@@ -463,66 +464,65 @@ kld_current_sos (void)
 		if (kld == kernel)
 			continue;
 
-		new = xmalloc(sizeof(*new));
-		memset(new, 0, sizeof(*new));
+		newobj = XCNEW (struct so_list);
 
-		new->lm_info = xmalloc(sizeof(*new->lm_info));
-		new->lm_info->base_address = 0;
+		newobj->lm_info = XNEW (struct lm_info);
+		newobj->lm_info->base_address = 0;
 
 		/* Read the base filename and store it in so_original_name. */
 		target_read_string(read_pointer(kld + info->off_filename),
-		    &path, sizeof(new->so_original_name), &error);
+		    &path, sizeof(newobj->so_original_name), &error);
 		if (error != 0) {
 			warning("kld_current_sos: Can't read filename: %s\n",
 			    safe_strerror(error));
-			free_so(new);
+			free_so(newobj);
 			continue;
 		}
-		strlcpy(new->so_original_name, path,
-		    sizeof(new->so_original_name));
+		strlcpy(newobj->so_original_name, path,
+		    sizeof(newobj->so_original_name));
 		xfree(path);
 
 		/*
 		 * Try to read the pathname (if it exists) and store
 		 * it in so_name.
 		 */
-		if (find_kld_path(new->so_original_name, new->so_name,
-		    sizeof(new->so_name))) {
+		if (find_kld_path(newobj->so_original_name, newobj->so_name,
+		    sizeof(newobj->so_name))) {
 			/* we found the kld */;
 		} else if (info->off_pathname != 0) {
 			target_read_string(read_pointer(kld +
 			    info->off_pathname),
-			    &path, sizeof(new->so_name), &error);
+			    &path, sizeof(newobj->so_name), &error);
 			if (error != 0) {
 				warning(
 		    "kld_current_sos: Can't read pathname for \"%s\": %s\n",
-				    new->so_original_name,
+				    newobj->so_original_name,
 				    safe_strerror(error));
-				strlcpy(new->so_name, new->so_original_name,
-				    sizeof(new->so_name));
+				strlcpy(newobj->so_name, newobj->so_original_name,
+				    sizeof(newobj->so_name));
 			} else {
-				strlcpy(new->so_name, path,
-				    sizeof(new->so_name));
+				strlcpy(newobj->so_name, path,
+				    sizeof(newobj->so_name));
 				xfree(path);
 			}
 		} else
-			strlcpy(new->so_name, new->so_original_name,
-			    sizeof(new->so_name));
+			strlcpy(newobj->so_name, newobj->so_original_name,
+			    sizeof(newobj->so_name));
 
 		/* Read this kld's base address. */
-		new->lm_info->base_address = read_pointer(kld +
+		newobj->lm_info->base_address = read_pointer(kld +
 		    info->off_address);
-		if (new->lm_info->base_address == 0) {
+		if (newobj->lm_info->base_address == 0) {
 			warning(
 			    "kld_current_sos: Invalid address for kld \"%s\"",
-			    new->so_original_name);
-			free_so(new);
+			    newobj->so_original_name);
+			free_so(newobj);
 			continue;
 		}
 
 		/* Append to the list. */
-		*prev = new;
-		prev = &new->next;
+		*prev = newobj;
+		prev = &newobj->next;
 	}
 
 	return (head);

Modified: head/devel/gdb/files/kgdb/fbsd-kthr.c
==============================================================================
--- head/devel/gdb/files/kgdb/fbsd-kthr.c	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/files/kgdb/fbsd-kthr.c	Sun Dec 18 16:08:14 2016	(r428876)
@@ -130,7 +130,7 @@ kgdb_thr_add_procs(CORE_ADDR paddr, CORE
 			} CATCH(e, RETURN_MASK_ERROR) {
 				break;
 			} END_CATCH
-			kt = malloc(sizeof(*kt));
+			kt = XNEW (struct kthr);
 			kt->next = first;
 			kt->kaddr = tdaddr;
 			if (tid == dumptid)

Modified: head/devel/gdb/files/kgdb/fbsd-kvm.c
==============================================================================
--- head/devel/gdb/files/kgdb/fbsd-kvm.c	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/files/kgdb/fbsd-kvm.c	Sun Dec 18 16:08:14 2016	(r428876)
@@ -94,7 +94,8 @@ fbsd_vmcore_set_supply_pcb (struct gdbar
 			    void (*supply_pcb) (struct regcache *,
 						CORE_ADDR))
 {
-  struct fbsd_vmcore_ops *ops = gdbarch_data (gdbarch, fbsd_vmcore_data);
+  struct fbsd_vmcore_ops *ops = (struct fbsd_vmcore_ops *)
+    gdbarch_data (gdbarch, fbsd_vmcore_data);
   ops->supply_pcb = supply_pcb;
 }
 
@@ -106,7 +107,8 @@ void
 fbsd_vmcore_set_cpu_pcb_addr (struct gdbarch *gdbarch,
 			      CORE_ADDR (*cpu_pcb_addr) (u_int))
 {
-  struct fbsd_vmcore_ops *ops = gdbarch_data (gdbarch, fbsd_vmcore_data);
+  struct fbsd_vmcore_ops *ops = (struct fbsd_vmcore_ops *)
+    gdbarch_data (gdbarch, fbsd_vmcore_data);
   ops->cpu_pcb_addr = cpu_pcb_addr;
 }
 
@@ -198,8 +200,6 @@ fbsd_kernel_osabi_sniffer(bfd *abfd)
 	return (GDB_OSABI_UNKNOWN);
 }
 
-#define	INKERNEL(x)	((x) >= kernstart)
-
 #ifdef HAVE_KVM_OPEN2
 static int
 kgdb_resolve_symbol(const char *name, kvaddr_t *kva)
@@ -217,8 +217,8 @@ kgdb_resolve_symbol(const char *name, kv
 static void
 kgdb_trgt_open(const char *arg, int from_tty)
 {
-	struct fbsd_vmcore_ops *ops = gdbarch_data (target_gdbarch(),
-	    fbsd_vmcore_data);
+	struct fbsd_vmcore_ops *ops = (struct fbsd_vmcore_ops *)
+	    gdbarch_data (target_gdbarch(), fbsd_vmcore_data);
 	struct inferior *inf;
 	struct cleanup *old_chain;
 	struct thread_info *ti;
@@ -421,8 +421,8 @@ static void
 kgdb_trgt_fetch_registers(struct target_ops *tops,
 			  struct regcache *regcache, int regnum)
 {
-	struct fbsd_vmcore_ops *ops = gdbarch_data (target_gdbarch(),
-	    fbsd_vmcore_data);
+	struct fbsd_vmcore_ops *ops = (struct fbsd_vmcore_ops *)
+	    gdbarch_data (target_gdbarch(), fbsd_vmcore_data);
 	struct kthr *kt;
 
 	if (ops->supply_pcb == NULL)
@@ -465,13 +465,21 @@ kgdb_trgt_xfer_partial(struct target_ops
 }
 
 static int
-kgdb_trgt_ignore_breakpoints(struct target_ops *ops, struct gdbarch *gdbarch,
+kgdb_trgt_insert_breakpoint(struct target_ops *ops, struct gdbarch *gdbarch,
     struct bp_target_info *bp_tgt)
 {
 
 	return 0;
 }
 
+static int
+kgdb_trgt_remove_breakpoint(struct target_ops *ops, struct gdbarch *gdbarch,
+    struct bp_target_info *bp_tgt, enum remove_bp_reason reason)
+{
+
+	return 0;
+}
+
 static void
 kgdb_switch_to_thread(int tid)
 {
@@ -499,7 +507,7 @@ kgdb_set_proc_cmd (char *arg, int from_t
 
 	addr = parse_and_eval_address (arg);
 
-	if (!INKERNEL (addr)) {
+	if (addr < kernstart) {
 		thr = kgdb_thr_lookup_pid((int)addr);
 		if (thr == NULL)
 			error ("invalid pid");
@@ -522,7 +530,7 @@ kgdb_set_tid_cmd (char *arg, int from_tt
 
 	addr = (CORE_ADDR) parse_and_eval_address (arg);
 
-	if (kvm != NULL && INKERNEL (addr)) {
+	if (kvm != NULL && addr >= kernstart) {
 		thr = kgdb_thr_lookup_taddr(addr);
 		if (thr == NULL)
 			error("invalid thread address");
@@ -564,8 +572,8 @@ _initialize_kgdb_target(void)
 	kgdb_trgt_ops.to_pid_to_str = kgdb_trgt_pid_to_str;
 	kgdb_trgt_ops.to_thread_alive = kgdb_trgt_thread_alive;
 	kgdb_trgt_ops.to_xfer_partial = kgdb_trgt_xfer_partial;
-	kgdb_trgt_ops.to_insert_breakpoint = kgdb_trgt_ignore_breakpoints;
-	kgdb_trgt_ops.to_remove_breakpoint = kgdb_trgt_ignore_breakpoints;
+	kgdb_trgt_ops.to_insert_breakpoint = kgdb_trgt_insert_breakpoint;
+	kgdb_trgt_ops.to_remove_breakpoint = kgdb_trgt_remove_breakpoint;
 
 	add_target(&kgdb_trgt_ops);
 

Modified: head/devel/gdb/files/kgdb/i386fbsd-kern.c
==============================================================================
--- head/devel/gdb/files/kgdb/i386fbsd-kern.c	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/files/kgdb/i386fbsd-kern.c	Sun Dec 18 16:08:14 2016	(r428876)
@@ -60,7 +60,7 @@ static const struct program_space_data *
 static void
 i386fbsd_pspace_data_cleanup (struct program_space *pspace, void *arg)
 {
-  struct i386fbsd_info *info = arg;
+  struct i386fbsd_info *info = (struct i386fbsd_info *)arg;
 
   xfree (info);
 }
@@ -73,7 +73,8 @@ get_i386fbsd_info (void)
 {
   struct i386fbsd_info *info;
 
-  info = program_space_data (current_program_space, i386fbsd_pspace_data);
+  info = (struct i386fbsd_info *)
+    program_space_data (current_program_space, i386fbsd_pspace_data);
   if (info != NULL)
     return info;
 
@@ -188,7 +189,7 @@ i386fbsd_fetch_tss(void)
 	if (addr == 0)
 		return (0);
 	addr += (kt->cpu * NGDT + GPROC0_SEL) * sizeof(sd);
-	if (target_read_memory(addr, (void *)&sd, sizeof(sd)) != 0)
+	if (target_read_memory(addr, (gdb_byte *)&sd, sizeof(sd)) != 0)
 		return (0);
 	if (sd.sd_type != SDT_SYS386BSY) {
 		warning ("descriptor is not a busy TSS");
@@ -225,7 +226,7 @@ i386fbsd_dblfault_cache (struct frame_in
   int i;
 
   if (*this_cache != NULL)
-    return (*this_cache);
+    return (struct trad_frame_cache *)(*this_cache);
 
   cache = trad_frame_cache_zalloc (this_frame);
   *this_cache = cache;
@@ -319,7 +320,7 @@ i386fbsd_trapframe_cache (struct frame_i
   int i;
 
   if (*this_cache != NULL)
-    return (*this_cache);
+    return ((struct trad_frame_cache *)*this_cache);
 
   info = get_i386fbsd_info();
   cache = trad_frame_cache_zalloc (this_frame);

Modified: head/devel/gdb/files/kgdb/kgdb-main.c
==============================================================================
--- head/devel/gdb/files/kgdb/kgdb-main.c	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/files/kgdb/kgdb-main.c	Sun Dec 18 16:08:14 2016	(r428876)
@@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/wait.h>
 #include <errno.h>
 #include <err.h>
-#include <inttypes.h>
 #include <kvm.h>
 #include <limits.h>
 #include <paths.h>
@@ -208,7 +207,8 @@ add_arg(struct captured_main_args *args,
 {
 
 	args->argc++;
-	args->argv = reallocf(args->argv, (args->argc + 1) * sizeof(char *));
+	args->argv = (char **)reallocf(args->argv, (args->argc + 1) *
+	    sizeof(char *));
 	if (args->argv == NULL)
 		err(1, "Out of memory building argument list");
 	args->argv[args->argc] = arg;
@@ -248,7 +248,7 @@ main(int argc, char *argv[])
 	kgdb_quiet = 0;
 	memset (&args, 0, sizeof args);
 	args.interpreter_p = INTERP_CONSOLE;
-	args.argv = malloc(sizeof(char *));
+	args.argv = (char **)xmalloc(sizeof(char *));
 	args.argv[0] = argv[0];
 
 	while ((ch = getopt(argc, argv, "ab:c:d:fn:qr:vw")) != -1) {

Modified: head/devel/gdb/files/kgdb/ppcfbsd-kern.c
==============================================================================
--- head/devel/gdb/files/kgdb/ppcfbsd-kern.c	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/files/kgdb/ppcfbsd-kern.c	Sun Dec 18 16:08:14 2016	(r428876)
@@ -118,7 +118,7 @@ ppcfbsd_trapframe_cache (struct frame_in
   int i, regnum;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct trad_frame_cache *)*this_cache;
 
   cache = trad_frame_cache_zalloc (this_frame);
   *this_cache = cache;

Modified: head/devel/gdb/files/kgdb/sparc64fbsd-kern.c
==============================================================================
--- head/devel/gdb/files/kgdb/sparc64fbsd-kern.c	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/files/kgdb/sparc64fbsd-kern.c	Sun Dec 18 16:08:14 2016	(r428876)
@@ -91,7 +91,7 @@ sparc64fbsd_trapframe_cache (struct fram
   int regnum;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct sparc_frame_cache *)*this_cache;
 
   cache = sparc_frame_cache (this_frame, this_cache);
   gdb_assert (cache == *this_cache);

Added: head/devel/gdb/files/patch-fixes
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gdb/files/patch-fixes	Sun Dec 18 16:08:14 2016	(r428876)
@@ -0,0 +1,11 @@
+--- gdb/compile/compile-loc2c.c.orig	2016-07-05 12:30:44.811467295 +0200
++++ gdb/compile/compile-loc2c.c	2016-07-05 12:38:46.432434206 +0200
+@@ -670,7 +670,7 @@
+       enum dwarf_location_atom op = (enum dwarf_location_atom) *op_ptr;
+       uint64_t uoffset, reg;
+       int64_t offset;
+-
++      uoffset = 0;
+       print_spaces (indent - 2, stream);
+       if (info[op_ptr - base].label)
+ 	{

Modified: head/devel/gdb/files/patch-gdb-configure
==============================================================================
--- head/devel/gdb/files/patch-gdb-configure	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/files/patch-gdb-configure	Sun Dec 18 16:08:14 2016	(r428876)
@@ -1,6 +1,18 @@
---- gdb/configure.orig	2016-03-07 10:33:02.757803766 +0100
-+++ gdb/configure	2016-03-07 10:32:39.480804873 +0100
-@@ -14297,8 +14297,7 @@
+--- gdb/configure.orig	2016-10-07 19:09:21.000000000 +0200
++++ gdb/configure	2016-10-18 11:11:30.452542000 +0200
+@@ -14256,9 +14256,8 @@
+ 
+ # These options work in either C or C++ modes.
+ build_warnings="-Wall -Wpointer-arith \
+--Wno-unused -Wunused-value -Wunused-function \
+--Wno-switch -Wno-char-subscripts \
+--Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable"
++-Wno-unused -Wno-switch -Wno-char-subscripts \
++-Wempty-body"
+ 
+ # Now add in C and C++ specific options, depending on mode.
+ if test "$enable_build_with_cxx" = "yes"; then
+@@ -14266,8 +14265,7 @@
  -Wno-narrowing"
  else
     build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \

Added: head/devel/gdb/files/patch-gdb-gnulib-import-stddef.in.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gdb/files/patch-gdb-gnulib-import-stddef.in.h	Sun Dec 18 16:08:14 2016	(r428876)
@@ -0,0 +1,11 @@
+--- gdb/gnulib/import/stddef.in.h.orig	2016-10-07 23:33:10.529558000 -0700
++++ gdb/gnulib/import/stddef.in.h	2016-10-07 23:33:23.824676000 -0700
+@@ -82,7 +82,7 @@
+ #endif
+ 
+ /* Some platforms lack max_align_t.  */
+-#if !@HAVE_MAX_ALIGN_T@
++#if 0
+ /* On the x86, the maximum storage alignment of double, long, etc. is 4,
+    but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
+    and the C11 standard allows this.  Work around this problem by

Added: head/devel/gdb/files/patch-gdb-x86bsd-nat.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gdb/files/patch-gdb-x86bsd-nat.c	Sun Dec 18 16:08:14 2016	(r428876)
@@ -0,0 +1,14 @@
+--- gdb/x86bsd-nat.c.orig	2016-10-18 13:27:55.820837000 +0200
++++ gdb/x86bsd-nat.c	2016-10-18 13:29:02.518927000 +0200
+@@ -82,7 +82,11 @@
+   /* For some mysterious reason, some of the reserved bits in the
+      debug control register get set.  Mask these off, otherwise the
+      ptrace call below will fail.  */
++#ifdef __i386__
++  DBREG_DRX ((&dbregs), 7) &= ~(0x0000fc00);
++#else
+   DBREG_DRX ((&dbregs), 7) &= ~(0xffffffff0000fc00);
++#endif 
+ 
+   DBREG_DRX ((&dbregs), regnum) = value;
+ 

Added: head/devel/gdb/files/patch-nowarning
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gdb/files/patch-nowarning	Sun Dec 18 16:08:14 2016	(r428876)
@@ -0,0 +1,65 @@
+--- gdb/arm-tdep.c.orig	2016-07-08 15:42:17.131392993 +0200
++++ gdb/arm-tdep.c	2016-07-08 15:44:10.506386463 +0200
+@@ -9880,7 +9880,7 @@
+       && !INSN_RECORDED(arm_insn_r))
+     {
+       /* Handle MLA(S) and MUL(S).  */
+-      if (0 <= insn_op1 && 3 >= insn_op1)
++      if (3 >= insn_op1)
+       {
+         record_buf[0] = bits (arm_insn_r->arm_insn, 12, 15);
+         record_buf[1] = ARM_PS_REGNUM;
+--- gdb/cris-tdep.c.orig	2016-07-08 15:45:26.575379589 +0200
++++ gdb/cris-tdep.c	2016-07-08 15:47:07.849372792 +0200
+@@ -1441,7 +1441,7 @@
+       /* Indeterminate/obsolete.  */
+       return 0;
+     case cris_ver_v0_3:
+-      return (version >= 0 && version <= 3);
++      return (version <= 3);
+     case cris_ver_v3p:
+       return (version >= 3);
+     case cris_ver_v8:
+@@ -1449,7 +1449,7 @@
+     case cris_ver_v8p:
+       return (version >= 8);
+     case cris_ver_v0_10:
+-      return (version >= 0 && version <= 10);
++      return (version <= 10);
+     case cris_ver_v3_10:
+       return (version >= 3 && version <= 10);
+     case cris_ver_v8_10:
+--- gdb/main.c.orig	2016-08-03 17:55:42.243017327 +0200
++++ gdb/main.c	2016-08-03 17:56:04.478015630 +0200
+@@ -226,7 +226,7 @@
+ 	    {
+ 	      /* Append the part of SYSTEM_GDBINIT that follows GDB_DATADIR
+ 		 to gdb_datadir.  */
+-	      char *tmp_sys_gdbinit = xstrdup (SYSTEM_GDBINIT + datadir_len);
++	      char *tmp_sys_gdbinit = xstrdup (&(SYSTEM_GDBINIT[datadir_len]));
+ 	      char *p;
+ 
+ 	      for (p = tmp_sys_gdbinit; IS_DIR_SEPARATOR (*p); ++p)
+--- gdb/dtrace-probe.c.orig	2016-08-03 17:57:18.454010903 +0200
++++ gdb/dtrace-probe.c	2016-08-03 17:58:01.001007519 +0200
+@@ -421,7 +421,8 @@
+ 	  arg.type_str = xstrdup (p);
+ 
+ 	  /* Use strtab_size as a sentinel.  */
+-	  while (*p++ != '\0' && p - strtab < strtab_size);
++	  while (*p++ != '\0' && p - strtab < strtab_size)
++		;
+ 
+ 	  /* Try to parse a type expression from the type string.  If
+ 	     this does not work then we set the type to `long
+--- libiberty/stack-limit.c.orig	2016-08-05 14:12:21.942893014 +0200
++++ libiberty/stack-limit.c	2016-08-05 14:12:58.794890125 +0200
+@@ -51,7 +51,7 @@
+   struct rlimit rlim;
+   if (getrlimit (RLIMIT_STACK, &rlim) == 0
+       && rlim.rlim_cur != RLIM_INFINITY
+-      && rlim.rlim_cur < pref
++      && rlim.rlim_cur < (rlim_t)pref
+       && (rlim.rlim_max == RLIM_INFINITY || rlim.rlim_cur < rlim.rlim_max))
+     {
+       rlim.rlim_cur = pref;

Modified: head/devel/gdb/pkg-plist
==============================================================================
--- head/devel/gdb/pkg-plist	Sun Dec 18 15:44:45 2016	(r428875)
+++ head/devel/gdb/pkg-plist	Sun Dec 18 16:08:14 2016	(r428876)
@@ -22,6 +22,7 @@ man/man1/gdb%%VER%%.1.gz
 %%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/unwinders.py
 %%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/command/xmethods.py
 %%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/function/__init__.py
+%%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/function/as_string.py
 %%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/function/caller_is.py
 %%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/function/strfns.py
 %%PYTHON%%%%DATADIR%%%%VER%%/python/gdb/printer/__init__.py
@@ -40,18 +41,18 @@ man/man1/gdb%%VER%%.1.gz
 %%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/support.scm
 %%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/types.go
 %%GUILE%%%%DATADIR%%%%VER%%/guile/gdb/types.scm
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/aarch64-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/amd64-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/arm-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/freebsd.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/gdb-syscalls.dtd
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/i386-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/mips-n32-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/mips-n64-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/mips-o32-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/ppc-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/ppc64-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/s390-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/s390x-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/sparc-linux.xml
-%%EXPAT%%%%DATADIR%%%%VER%%/syscalls/sparc64-linux.xml
+%%DATADIR%%%%VER%%/syscalls/aarch64-linux.xml
+%%DATADIR%%%%VER%%/syscalls/amd64-linux.xml
+%%DATADIR%%%%VER%%/syscalls/arm-linux.xml
+%%DATADIR%%%%VER%%/syscalls/freebsd.xml
+%%DATADIR%%%%VER%%/syscalls/gdb-syscalls.dtd
+%%DATADIR%%%%VER%%/syscalls/i386-linux.xml
+%%DATADIR%%%%VER%%/syscalls/mips-n32-linux.xml
+%%DATADIR%%%%VER%%/syscalls/mips-n64-linux.xml
+%%DATADIR%%%%VER%%/syscalls/mips-o32-linux.xml
+%%DATADIR%%%%VER%%/syscalls/ppc-linux.xml
+%%DATADIR%%%%VER%%/syscalls/ppc64-linux.xml
+%%DATADIR%%%%VER%%/syscalls/s390-linux.xml
+%%DATADIR%%%%VER%%/syscalls/s390x-linux.xml
+%%DATADIR%%%%VER%%/syscalls/sparc-linux.xml
+%%DATADIR%%%%VER%%/syscalls/sparc64-linux.xml



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612181608.uBIG8Emn051174>