Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Aug 2012 07:46:13 GMT
From:      Luca Pizzammiglio <luca.pizzamiglio@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/171109: [MAINTAINER] Fix several issues in the last gdb 7.5
Message-ID:  <201208270746.q7R7kDUt037440@red.freebsd.org>
Resent-Message-ID: <201208270750.q7R7o34S057760@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         171109
>Category:       ports
>Synopsis:       [MAINTAINER] Fix several issues in the last gdb 7.5
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 27 07:50:03 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Luca Pizzammiglio
>Release:        FreeBSD 8.3-STABLE
>Organization:
>Environment:
FreeBSD pizzamig.bally.de 8.3-STABLE FreeBSD 8.3-STABLE #9: Thu Aug 23 16:22:24 CEST 2012     root@pizzamig.xxx.de:/usr/obj/usr/src/sys/PIZZAMIG  i386
>Description:
This patch integrates the patch submitted with the PR ports/171086 (thanks Tijl Coosemans <tijl@coosemans.org> for the patch) and a fix on amd64 architecture for a segmentation fault (thanks Arrowdodger <6yearold@gmail.com> for the report)
>How-To-Repeat:
Run gdb on a amd64 system
>Fix:


Patch attached with submission follows:

diff -Nru devel/gdb.orig/Makefile devel/gdb/Makefile
--- devel/gdb.orig/Makefile	2012-08-24 04:54:50.000000000 +0200
+++ devel/gdb/Makefile	2012-08-26 20:56:04.226051000 +0200
@@ -2,11 +2,12 @@
 # Date created:				16 November 2010
 # Whom:					Steven Kreuzer <skreuzer@FreeBSD.org>
 #
-# $FreeBSD: ports/devel/gdb/Makefile,v 1.23 2012/08/24 02:54:50 bdrewery Exp $
+# $FreeBSD$
 #
 
 PORTNAME=	gdb
 PORTVERSION=	7.5
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	GNU
 
@@ -30,7 +31,8 @@
 CFLAGS:=	${CFLAGS:C/ +$//}	# blanks at EOL creep in sometimes
 CFLAGS+=	-DRL_NO_COMPAT
 EXCLUDE=	dejagnu expect readline sim texinfo intl
-EXTRACT_AFTER_ARGS=| ${TAR} -xf - ${EXCLUDE:S/^/--exclude /}
+EXTRACT_AFTER_ARGS=	| ${TAR} -xf - ${EXCLUDE:S/^/--exclude /} \
+			--no-same-owner --no-same-permissions
 VER=	${PORTVERSION:S/.//g}
 PLIST_SUB=	VER=${VER}
 MAN1=	gdb${VER}.1
diff -Nru devel/gdb.orig/files/extrapatch-gdb-Makefile.in devel/gdb/files/extrapatch-gdb-Makefile.in
--- devel/gdb.orig/files/extrapatch-gdb-Makefile.in	2012-08-24 04:54:50.000000000 +0200
+++ devel/gdb/files/extrapatch-gdb-Makefile.in	2012-08-26 21:14:57.407051000 +0200
@@ -1,5 +1,5 @@
 --- gdb/Makefile.in.orig	2012-07-02 17:29:33.000000000 +0200
-+++ gdb/Makefile.in	2012-08-22 16:50:26.000000000 +0200
++++ gdb/Makefile.in	2012-08-26 21:01:45.589052997 +0200
 @@ -572,7 +572,7 @@
  	xstormy16-tdep.o \
  	xtensa-config.o xtensa-tdep.o xtensa-linux-tdep.o \
@@ -18,6 +18,15 @@
  mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \
  ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
  f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \
+@@ -1164,7 +1164,7 @@
+ # Removing the old gdb first works better if it is running, at least on SunOS.
+ gdb$(EXEEXT): gdb.o $(LIBGDB_OBS) $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
+ 	rm -f gdb$(EXEEXT)
+-	$(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) \
++	$(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -Wl,-E \
+ 		-o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
+ 		$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
+ 
 @@ -1429,7 +1429,7 @@
  	armnbsd-nat.c armbsd-tdep.c armnbsd-tdep.c armobsd-tdep.c \
  	avr-tdep.c \
diff -Nru devel/gdb.orig/files/patch-gdb-amd64-nat.h devel/gdb/files/patch-gdb-amd64-nat.h
--- devel/gdb.orig/files/patch-gdb-amd64-nat.h	2012-02-25 12:57:56.000000000 +0100
+++ devel/gdb/files/patch-gdb-amd64-nat.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
---- gdb/amd64-nat.h.orig	2011-09-23 01:36:54.874780473 +0100
-+++ gdb/amd64-nat.h	2011-09-23 01:28:46.964218514 +0100
-@@ -50,9 +50,4 @@
- extern void amd64_collect_native_gregset (const struct regcache *regcache,
- 					  void *gregs, int regnum);
- 
--/* Create a prototype *BSD/amd64 target.  The client can override it
--   with local methods.  */
--
--extern struct target_ops *amd64bsd_target (void);
--
- #endif /* amd64-nat.h */
diff -Nru devel/gdb.orig/files/patch-gdb-configure devel/gdb/files/patch-gdb-configure
--- devel/gdb.orig/files/patch-gdb-configure	1970-01-01 01:00:00.000000000 +0100
+++ devel/gdb/files/patch-gdb-configure	2012-08-26 21:05:47.995052000 +0200
@@ -0,0 +1,22 @@
+--- gdb/configure.orig	2012-08-24 14:03:52.000000000 +0200
++++ gdb/configure	2012-08-24 14:05:06.000000000 +0200
+@@ -10590,7 +10590,8 @@
+ 
+ # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
+ # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
+-ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
++ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
++#include <machine/reg.h>
+ "
+ if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
+ 
+@@ -10600,7 +10601,8 @@
+ 
+ 
+ fi
+-ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
++ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
++#include <machine/reg.h>
+ "
+ if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
+ 


>Release-Note:
>Audit-Trail:
>Unformatted:



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