Subject: Re: Can't build with gdb6 due to /usr/bin/psim
To: None <current-users@netbsd.org>
From: Makoto Fujiwara <makoto@ki.nu>
List: current-users
Date: 07/31/2006 00:09:24
--Multipart_Mon_Jul_31_00:09:24_2006-1
Content-Type: text/plain; charset=US-ASCII
In the mail:
| To: current-users@NetBSD.org
| From: Magnus Henoch <mange@freemail.hu>
| Subject: Can't build with gdb6 due to /usr/bin/psim
| Date: Sat, 29 Jul 2006 20:02:32 +0200
Magnus> ======= 1 extra files in DESTDIR =========
Magnus> Files in DESTDIR but missing from flist.
Magnus> File is obsolete or flist is out of date ?
Magnus> ------------------------------------------
Magnus> ./usr/bin/psim
Magnus> ========= end of 1 extra files ===========
I had just been working on the same problem. My patch
to this problem for (2006-07-28-UTC) is attached.
This includes setting default to gdb6 for powerpc. gdb5.3
seems to be broken on somewhere in gdb/dwarf2read.c.
---
Makoto Fujiwara
--Multipart_Mon_Jul_31_00:09:24_2006-1
Content-Type: text/plain; charset=US-ASCII
Index: distrib/sets/sets.subr
===================================================================
RCS file: /export/cvsync/src/distrib/sets/sets.subr,v
retrieving revision 1.53
diff -u -a -r1.53 sets.subr
--- distrib/sets/sets.subr 23 Jul 2006 11:41:24 -0000 1.53
+++ distrib/sets/sets.subr 30 Jul 2006 14:03:29 -0000
@@ -423,6 +423,14 @@
fi
fi
+ if [ "${HAVE_GDB}" = "6" ]; then
+ if [ -f $setdir/gdb6.mi ]; then
+ echo $setdir/gdb6.mi
+ fi
+ if [ -f $setdir/gdb6.ad.${MACHINE_CPU} ]; then
+ echo $setdir/gdb6.ad.${MACHINE_CPU}
+ fi
+ fi
if [ -f $setdir/rescue.mi ]; then
echo $setdir/rescue.mi
fi
Index: distrib/sets/lists/comp/gdb6.ad.powerpc
===================================================================
RCS file: distrib/sets/lists/comp/gdb6.ad.powerpc
diff -N distrib/sets/lists/comp/gdb6.ad.powerpc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ distrib/sets/lists/comp/gdb6.ad.powerpc 30 Jul 2006 14:02:34 -0000
@@ -0,0 +1,2 @@
+# $NetBSD$
+./usr/bin/psim comp-debug-bin gdb
Index: distrib/sets/lists/comp/gdb6.mi
===================================================================
RCS file: distrib/sets/lists/comp/gdb6.mi
diff -N distrib/sets/lists/comp/gdb6.mi
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ distrib/sets/lists/comp/gdb6.mi 30 Jul 2006 14:02:24 -0000
@@ -0,0 +1,2 @@
+# $NetBSD$
+./usr/bin/gdbtui comp-debug-bin gdb
Index: gnu/dist/gdb6/sim/ppc/device.c
===================================================================
RCS file: /export/cvsync/src/gnu/dist/gdb6/sim/ppc/device.c,v
retrieving revision 1.1.1.1
diff -u -a -r1.1.1.1 device.c
--- gnu/dist/gdb6/sim/ppc/device.c 15 May 2006 14:25:09 -0000 1.1.1.1
+++ gnu/dist/gdb6/sim/ppc/device.c 29 Jul 2006 21:50:11 -0000
@@ -1712,7 +1712,7 @@
{
if (port_name == NULL || port_name[0] == '\0')
return 0;
- if (isdigit(port_name[0])) {
+ if (isdigit((int)port_name[0])) {
return strtoul(port_name, NULL, 0);
}
else {
@@ -1727,7 +1727,7 @@
if (strncmp(port_name, ports->name, len) == 0) {
if (port_name[len] == '\0')
return ports->number;
- else if(isdigit(port_name[len])) {
+ else if(isdigit((int)port_name[len])) {
int port = ports->number + strtoul(&port_name[len], NULL, 0);
if (port >= ports->number + ports->nr_ports)
device_error(me, "Interrupt port %s out of range",
@@ -1816,7 +1816,7 @@
/* I/O */
EXTERN_DEVICE\
-(void volatile)
+(void)
device_error(device *me,
const char *fmt,
...)
Index: gnu/dist/gdb6/sim/ppc/device.h
===================================================================
RCS file: /export/cvsync/src/gnu/dist/gdb6/sim/ppc/device.h,v
retrieving revision 1.1.1.1
diff -u -a -r1.1.1.1 device.h
--- gnu/dist/gdb6/sim/ppc/device.h 15 May 2006 14:25:09 -0000 1.1.1.1
+++ gnu/dist/gdb6/sim/ppc/device.h 29 Jul 2006 21:50:11 -0000
@@ -727,7 +727,7 @@
*/
EXTERN_DEVICE\
-(void volatile) device_error
+(void) device_error
(device *me,
const char *fmt,
...) __attribute__ ((format (printf, 2, 3)));
Index: share/mk/bsd.own.mk
===================================================================
RCS file: /export/cvsync/src/share/mk/bsd.own.mk,v
retrieving revision 1.467
diff -u -a -r1.467 bsd.own.mk
--- share/mk/bsd.own.mk 24 Jul 2006 23:54:15 -0000 1.467
+++ share/mk/bsd.own.mk 29 Jul 2006 21:50:11 -0000
@@ -79,6 +79,10 @@
# Transitional for toolchain upgrade to GDB6
#
#HAVE_GDB?= 6
+.if \
+ ${MACHINE_ARCH} == "powerpc"
+HAVE_GDB?= 6
+.endif
HAVE_GDB?= 5
--Multipart_Mon_Jul_31_00:09:24_2006-1--