Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Aug 2012 00:23:04 GMT
From:      Sam Varshavchik <mrsam@courier-mta.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/171099: gdb 7.5 is needed to fully support lang/gcc47
Message-ID:  <201208270023.q7R0N4GZ059394@red.freebsd.org>
Resent-Message-ID: <201208270030.q7R0U1Pq094368@freefall.freebsd.org>

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

>Number:         171099
>Category:       ports
>Synopsis:       gdb 7.5 is needed to fully support lang/gcc47
>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 Aug 27 00:30:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Sam Varshavchik
>Release:        9.0-p3
>Organization:
>Environment:
FreeBSD freebsd.email-scan.com 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
gcc 4.7 with -std=c++0x emits code which the current devel/gdb port, for gdb 7.3 can't quite deal with.

Need to update devel/gdb to 7.5


>How-To-Repeat:
Use gcc 4.7 to compile C++11x code that uses lambdas, try to debug with gdb73

>Fix:
I have good results by updating the port to 7.5, FWIW, as attached.



Patch attached with submission follows:

--- ../gdb/Makefile	2011-11-18 01:34:51.000000000 -0500
+++ Makefile	2012-08-26 15:11:37.000000000 -0400
@@ -7,7 +7,7 @@
 #
 
 PORTNAME=	gdb
-PORTVERSION=	7.3.1
+PORTVERSION=	7.5
 PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_GNU:S,$,:gdb,}
--- ../gdb/distinfo	2011-09-26 09:53:11.000000000 -0400
+++ distinfo	2012-08-26 15:13:53.000000000 -0400
@@ -1,2 +1,2 @@
-SHA256 (gdb-7.3.1.tar.bz2) = 6d7bff716fde98d03866a1b747c0929ee7dba49bca13e01d975e0b0fa9b33a28
-SIZE (gdb-7.3.1.tar.bz2) = 19500995
+SHA256 (gdb-7.5.tar.bz2) = d178c45c328369ae4f24f9a0ec53b7d009e2bfa1d41b7027280b24f58ae61932
+SIZE (gdb-7.5.tar.bz2) = 21327195
diff -U 3 -N -r ../gdb/files/fbsd-threads.c files/fbsd-threads.c
--- ../gdb/files/fbsd-threads.c	2011-11-06 13:12:32.000000000 -0500
+++ files/fbsd-threads.c	2012-08-26 15:37:34.000000000 -0400
@@ -530,7 +530,7 @@
 
 static void
 fbsd_thread_resume (struct target_ops *ops,
-		    ptid_t ptid, int step, enum target_signal signo)
+		    ptid_t ptid, int step, enum gdb_signal signo)
 {
   struct target_ops *beneath = find_target_beneath (ops);
   td_thrhandle_t th;
@@ -585,7 +585,7 @@
   if (lwp)
     {
       int req = step ? PT_SETSTEP : PT_CLEARSTEP;
-      if (ptrace (req, (pid_t) lwp, (caddr_t) 1, target_signal_to_host(signo)))
+      if (ptrace (req, (pid_t) lwp, (caddr_t) 1, gdb_signal_to_host(signo)))
         perror_with_name ("PT_SETSTEP/PT_CLEARSTEP");
     }
 
@@ -624,7 +624,7 @@
 
   /* now continue the process, suspended thread wont run */
   if (ptrace (PT_CONTINUE, proc_handle.pid , (caddr_t)1,
-	      target_signal_to_host(signo)))
+	      gdb_signal_to_host(signo)))
     perror_with_name ("PT_CONTINUE");
 }
 
@@ -735,7 +735,7 @@
 	 */
         attach_thread(ret, &th, &ti, 1);
       }
-      if (ourstatus->value.sig == TARGET_SIGNAL_TRAP)
+      if (ourstatus->value.sig == GDB_SIGNAL_TRAP)
         check_event(ret);
       /* this is a hack, if an event won't cause gdb to stop, for example,
          SIGARLM, gdb resumes the process immediatly without setting
diff -U 3 -N -r ../gdb/files/patch-gdb-Makefile.in files/patch-gdb-Makefile.in
--- ../gdb/files/patch-gdb-Makefile.in	2011-09-26 09:53:11.000000000 -0400
+++ files/patch-gdb-Makefile.in	2012-08-26 15:20:30.000000000 -0400
@@ -1,6 +1,6 @@
---- gdb/Makefile.in	2011-03-30 08:55:39.000000000 +0200
-+++ gdb/Makefile.in	2011-09-12 17:40:33.000000000 +0200
-@@ -571,7 +571,7 @@
+--- gdb/Makefile.in.orig	2012-07-02 11:29:33.000000000 -0400
++++ gdb/Makefile.in	2012-08-26 15:19:40.000000000 -0400
+@@ -572,7 +572,7 @@
  	xstormy16-tdep.o \
  	xtensa-config.o xtensa-tdep.o xtensa-linux-tdep.o \
  	glibc-tdep.o \
@@ -8,31 +8,31 @@
 +	fbsd-threads.o \
  	nbsd-tdep.o obsd-tdep.o \
  	sol2-tdep.o \
- 	solib-frv.o solib-irix.o solib-svr4.o solib-target.o \
-@@ -768,7 +768,7 @@
- gnulib/stdint.in.h remote.h gdb.h sparc-nat.h \
- gdbthread.h dwarf2-frame.h nbsd-nat.h dcache.h \
+ 	solib-frv.o solib-irix.o solib-svr4.o \
+@@ -779,7 +779,7 @@
+ gnulib/import/stdint.in.h remote.h gdb.h sparc-nat.h \
+ gdbthread.h dwarf2-frame.h dwarf2-frame-tailcall.h nbsd-nat.h dcache.h \
  amd64-nat.h s390-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \
--gdbarch.h bsd-uthread.h gdb_thread_db.h gdb_stat.h memory-map.h	memrange.h \
-+gdbarch.h gdb_thread_db.h gdb_stat.h memory-map.h	memrange.h \
+-gdbarch.h bsd-uthread.h gdb_stat.h memory-map.h	memrange.h \
++gdbarch.h gdb_stat.h memory-map.h	memrange.h \
  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 \
-@@ -1161,7 +1161,7 @@
+@@ -1164,7 +1164,7 @@
  # Removing the old gdb first works better if it is running, at least on SunOS.
- gdb$(EXEEXT): gdb.o libgdb.a $(ADD_DEPS) $(CDEPS) $(TDEPLIBS)
+ 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.a \
++	$(CC_LD) $(INTERNAL_LDFLAGS) $(WIN32LDAPP) -Wl,-E\
+ 		-o gdb$(EXEEXT) gdb.o $(LIBGDB_OBS) \
  		$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
  
-@@ -1452,7 +1452,7 @@
+@@ -1429,7 +1429,7 @@
  	armnbsd-nat.c armbsd-tdep.c armnbsd-tdep.c armobsd-tdep.c \
  	avr-tdep.c \
  	bfin-linux-tdep.c bfin-tdep.c \
 -	bsd-uthread.c bsd-kvm.c \
 +	fbsd-threads.c bsd-kvm.c \
- 	core-regset.c corelow.c \
+ 	core-regset.c \
  	dcache.c dicos-tdep.c darwin-nat.c \
  	exec.c \
diff -U 3 -N -r ../gdb/files/patch-gdb-configure.tgt files/patch-gdb-configure.tgt
--- ../gdb/files/patch-gdb-configure.tgt	2010-11-16 15:39:48.000000000 -0500
+++ files/patch-gdb-configure.tgt	2012-08-26 15:26:02.000000000 -0400
@@ -1,20 +1,20 @@
---- gdb/configure.tgt.orig	2010-09-30 13:38:12.841406000 -0400
-+++ gdb/configure.tgt	2010-09-30 13:38:49.131127000 -0400
-@@ -169,7 +169,7 @@
+--- gdb/configure.tgt.orig	2012-08-01 15:48:44.000000000 -0400
++++ gdb/configure.tgt	2012-08-26 15:25:11.000000000 -0400
+@@ -176,7 +176,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 \
--			bsd-uthread.o corelow.o solib.o solib-svr4.o"
-+			fbsd-threads.o corelow.o solib.o solib-svr4.o"
+-			bsd-uthread.o solib-svr4.o"
++			fbsd-threads.o solib-svr4.o"
  	;;
  i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu)
  	# Target: NetBSD/i386
-@@ -579,7 +579,7 @@
+@@ -606,7 +606,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 corelow.o solib.o solib-svr4.o"
-+			fbsd-threads.o corelow.o solib.o solib-svr4.o"
+-			bsd-uthread.o solib-svr4.o"
++			fbsd-threads.o solib-svr4.o"
  	;;
  x86_64-*-mingw*)
          # Target: MingW/amd64
diff -U 3 -N -r ../gdb/files/patch-tui-tui-io.c files/patch-tui-tui-io.c
--- ../gdb/files/patch-tui-tui-io.c	1969-12-31 19:00:00.000000000 -0500
+++ files/patch-tui-tui-io.c	2012-08-26 15:43:17.000000000 -0400
@@ -0,0 +1,35 @@
+--- tui/tui-io.c~	2012-01-04 03:27:58.000000000 -0500
++++ tui/tui-io.c	2012-08-26 15:42:30.000000000 -0400
+@@ -505,7 +505,7 @@
+ void
+ tui_setup_io (int mode)
+ {
+-  extern int _rl_echoing_p;
++  extern int readline_echoing_p;
+ 
+   if (mode)
+     {
+@@ -515,12 +515,12 @@
+       tui_old_rl_prep_terminal = rl_prep_term_function;
+       tui_old_rl_getc_function = rl_getc_function;
+       tui_old_rl_outstream = rl_outstream;
+-      tui_old_rl_echoing_p = _rl_echoing_p;
++      tui_old_rl_echoing_p = readline_echoing_p;
+       rl_redisplay_function = tui_redisplay_readline;
+       rl_deprep_term_function = tui_deprep_terminal;
+       rl_prep_term_function = tui_prep_terminal;
+       rl_getc_function = tui_getc;
+-      _rl_echoing_p = 0;
++      readline_echoing_p = 0;
+       rl_outstream = tui_rl_outstream;
+       rl_prompt = 0;
+       rl_completion_display_matches_hook = tui_rl_display_match_list;
+@@ -559,7 +559,7 @@
+       rl_getc_function = tui_old_rl_getc_function;
+       rl_outstream = tui_old_rl_outstream;
+       rl_completion_display_matches_hook = 0;
+-      _rl_echoing_p = tui_old_rl_echoing_p;
++      readline_echoing_p = tui_old_rl_echoing_p;
+       rl_already_prompted = 0;
+ 
+       /* Save tty for SIGCONT.  */


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



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