Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 May 2013 06:35:42 GMT
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/178784: [patch] enable PowerPC support in devel/gdb
Message-ID:  <201305200635.r4K6ZgLK022601@oldred.FreeBSD.org>
Resent-Message-ID: <201305200640.r4K6e06c019145@freefall.freebsd.org>

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

>Number:         178784
>Category:       ports
>Synopsis:       [patch] enable PowerPC support in devel/gdb
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 20 06:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Tobler
>Release:        -CURRENT
>Organization:
none
>Environment:
>Description:
The latest gdb, 7.6, brings native PowerPC FreeBSD support. We just need enable it in ports.
There is a minor glitch which needs patching gdb itself. Namely, ALL_TARGET_OBJ is missing ppcfbsd-tdep.o. This part is already sent upstream.

The attached patch enables PowerPC support in gdb.
The patch is made with svn diff in the devel/gdb directory.
>How-To-Repeat:
-
>Fix:
Apply the attached patch :)

Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 318568)
+++ Makefile	(working copy)
@@ -30,7 +30,7 @@
 PLIST_SUB=	VER=${VER}
 MAN1=	gdb${VER}.1
 
-ONLY_FOR_ARCHS=	i386 amd64	# untested elsewhere, might work
+ONLY_FOR_ARCHS=	i386 amd64 powerpc powerpc64	# untested elsewhere, might work
 
 OPTIONS_DEFINE=	DEBUG EXPAT PYTHON THREADS TUI GDB_LINK
 OPTIONS_SINGLE_READLINE=	BASE_READLINE BUNDLED_READLINE PORT_READLINE
Index: files/extrapatch-gdb-Makefile.in
===================================================================
--- files/extrapatch-gdb-Makefile.in	(revision 318568)
+++ files/extrapatch-gdb-Makefile.in	(working copy)
@@ -1,14 +1,25 @@
---- gdb/Makefile.in.orig	2012-07-02 17:29:33.000000000 +0200
-+++ gdb/Makefile.in	2012-08-26 21:01:45.589052997 +0200
-@@ -573,6 +573,7 @@
+--- gdb/Makefile.in.orig	2013-04-02 19:38:43.000000000 +0200
++++ gdb/Makefile.in	2013-05-18 13:08:47.000000000 +0200
+@@ -566,8 +566,8 @@
+ 	moxie-tdep.o \
+ 	mt-tdep.o \
+ 	nto-tdep.o \
+-	ppc-linux-tdep.o ppcnbsd-tdep.o ppcobsd-tdep.o ppc-sysv-tdep.o \
+-	ppc64-tdep.o rl78-tdep.o \
++	ppc-linux-tdep.o ppcfbsd-tdep.o ppcnbsd-tdep.o ppcobsd-tdep.o \
++	ppc-sysv-tdep.o ppc64-tdep.o rl78-tdep.o \
+ 	rs6000-aix-tdep.o rs6000-tdep.o ppc-ravenscar-thread.o \
+ 	rs6000-lynx178-tdep.o \
+ 	rx-tdep.o \
+@@ -585,6 +585,7 @@
  	xtensa-config.o xtensa-tdep.o xtensa-linux-tdep.o \
  	glibc-tdep.o \
-	bsd-uthread.o \
+ 	bsd-uthread.o \
 +	fbsd-threads.o \
  	nbsd-tdep.o obsd-tdep.o \
  	sol2-tdep.o \
  	solib-frv.o solib-irix.o solib-svr4.o \
-@@ -1164,7 +1164,7 @@
+@@ -1173,7 +1174,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)
@@ -17,7 +28,7 @@
  		-o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
  		$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
  
-@@ -1429,7 +1429,7 @@
+@@ -1442,7 +1443,7 @@
  	armnbsd-nat.c armbsd-tdep.c armnbsd-tdep.c armobsd-tdep.c \
  	avr-tdep.c \
  	bfin-linux-tdep.c bfin-tdep.c \
Index: files/extrapatch-gdb-configure.tgt
===================================================================
--- files/extrapatch-gdb-configure.tgt	(revision 318568)
+++ files/extrapatch-gdb-configure.tgt	(working copy)
@@ -1,6 +1,6 @@
---- gdb/configure.tgt.orig	2012-08-01 21:48:44.000000000 +0200
-+++ gdb/configure.tgt	2012-08-22 16:47:02.000000000 +0200
-@@ -176,7 +176,7 @@
+--- gdb/configure.tgt.orig	2013-03-05 14:37:10.000000000 +0100
++++ gdb/configure.tgt	2013-05-18 13:11:06.000000000 +0200
+@@ -188,7 +188,7 @@
  i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu)
  	# Target: FreeBSD/i386
  	gdb_target_obs="i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
@@ -9,12 +9,21 @@
  	;;
  i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu)
  	# Target: NetBSD/i386
-@@ -606,7 +606,7 @@
+@@ -398,7 +398,7 @@
+ powerpc*-*-freebsd*)
+ 	# Target: FreeBSD/powerpc
+ 	gdb_target_obs="rs6000-tdep.o ppc-sysv-tdep.o ppc64-tdep.o \
+-		        ppcfbsd-tdep.o solib-svr4.o \
++		        ppcfbsd-tdep.o solib-svr4.o fbsd-threads.o \
+ 			ravenscar-thread.o ppc-ravenscar-thread.o"
+ 	;;
+ 
+@@ -650,7 +650,7 @@
  	# Target: FreeBSD/amd64
  	gdb_target_obs="amd64-tdep.o amd64fbsd-tdep.o i386-tdep.o \
  			i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o \
 -			bsd-uthread.o solib-svr4.o"
 +			fbsd-threads.o solib-svr4.o"
  	;;
- x86_64-*-mingw*)
+ x86_64-*-mingw* | x86_64-*-cygwin*)
          # Target: MingW/amd64


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



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