This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
GDB 6.5 RTEMS patch
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 13 Jul 2006 15:41:19 -0500
- Subject: GDB 6.5 RTEMS patch
Hi,
Attached is the patch we are using with gdb 6.5 for RTEMS.
It is essentially the same patch we used with 6.4. It
primarily enables the erc32 simulator for sparc-rtems
and makes it compile. There were a couple of minor
Makefile glitches fixed to make packaging with RPM
work for us. It is one patch but touches code in
3 directories with ChangeLogs.
I am not subscribed to this list so please cc me on
any replies.
Thanks.
--Joel Sherrill
ChangeLog for gdb subdirectory
2006-07-13 Joel Sherrill <joel.sherrill@oarcorp.com>
* config/sparc/embedded.mt: New file which enables SPARC simulator.
* configure.tgt (sparc-*-rtems*) Use embedded simulator target.
=====================================================
ChangeLog for sim subdirectory
configure---> Regenerate!!! Not inpatch
2006-07-13 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac (sparc-*-rtems*|sparc-*-elf*) Enable erc32 simulator.
* configure: Regenerated.
* Makefile.in: Pass libdir to subdirectories.
=====================================================
ChangeLog for sim/erc32 subdirectory
2006-07-13 Joel Sherrill <joel.sherrill@oarcorp.com>
* exec.c: Add missing break statements that gcc complains about.
* Makefile.in: Honor DESTDIR override so RTEMS RPM builds OK.
=====================================================
diff -uNr /home/joel/tools-original/gdb-6.5/bfd/sysdep.h gdb-6.5/bfd/sysdep.h
--- /home/joel/tools-original/gdb-6.5/bfd/sysdep.h 2005-05-05 13:51:14.000000000 -0500
+++ gdb-6.5/bfd/sysdep.h 2006-07-13 10:00:00.000000000 -0500
@@ -135,7 +135,7 @@
#endif
#if !HAVE_DECL_STRSTR
-extern char *strstr ();
+/* extern char *strstr (); */
#endif
#ifdef HAVE_FTELLO
diff -uNr /home/joel/tools-original/gdb-6.5/gdb/config/sparc/embedded.mt gdb-6.5/gdb/config/sparc/embedded.mt
--- /home/joel/tools-original/gdb-6.5/gdb/config/sparc/embedded.mt 1969-12-31 18:00:00.000000000 -0600
+++ gdb-6.5/gdb/config/sparc/embedded.mt 2006-07-13 10:00:00.000000000 -0500
@@ -0,0 +1,5 @@
+# Target: SPARC embedded with simulator
+TDEPFILES= sparc-tdep.o
+
+SIM_OBS = remote-sim.o
+SIM = ../sim/erc32/libsim.a
diff -uNr /home/joel/tools-original/gdb-6.5/gdb/configure.tgt gdb-6.5/gdb/configure.tgt
--- /home/joel/tools-original/gdb-6.5/gdb/configure.tgt 2006-04-20 18:18:48.000000000 -0500
+++ gdb-6.5/gdb/configure.tgt 2006-07-13 10:00:00.000000000 -0500
@@ -197,6 +197,7 @@
sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
gdb_target=sol2-64
;;
+sparc-*-rtems*) gdb_target=embedded ;;
sparc-*-*) gdb_target=sparc ;;
sparc64-*-*) gdb_target=sparc64 ;;
diff -uNr /home/joel/tools-original/gdb-6.5/sim/configure gdb-6.5/sim/configure
--- /home/joel/tools-original/gdb-6.5/sim/configure 2006-05-05 12:11:19.000000000 -0500
+++ gdb-6.5/sim/configure 2006-07-13 10:00:00.000000000 -0500
@@ -3525,6 +3525,14 @@
testsuite=yes
common=yes
;;
+ sparc-*-rtems*|sparc-*-elf*)
+
+
+subdirs="$subdirs erc32"
+
+ testsuite=yes
+ common=yes
+ ;;
powerpc*-*-* )
diff -uNr /home/joel/tools-original/gdb-6.5/sim/configure.ac gdb-6.5/sim/configure.ac
--- /home/joel/tools-original/gdb-6.5/sim/configure.ac 2006-05-05 12:11:19.000000000 -0500
+++ gdb-6.5/sim/configure.ac 2006-07-13 10:00:00.000000000 -0500
@@ -115,6 +115,11 @@
testsuite=yes
common=yes
;;
+ sparc-*-rtems*|sparc-*-elf*)
+ AC_CONFIG_SUBDIRS(erc32)
+ testsuite=yes
+ common=yes
+ ;;
powerpc*-*-* )
AC_CONFIG_SUBDIRS(ppc)
common=yes
diff -uNr /home/joel/tools-original/gdb-6.5/sim/erc32/exec.c gdb-6.5/sim/erc32/exec.c
--- /home/joel/tools-original/gdb-6.5/sim/erc32/exec.c 2005-03-07 05:09:05.000000000 -0600
+++ gdb-6.5/sim/erc32/exec.c 2006-07-13 10:00:00.000000000 -0500
@@ -1713,7 +1713,7 @@
sregs->fdp[rs2 | 1] = sregs->fs[rs2 & ~1];
sregs->fdp[rs2 & ~1] = sregs->fs[rs2 | 1];
default:
- ;
+ break;
}
#endif
@@ -1886,7 +1886,7 @@
sregs->fs[rd & ~1] = sregs->fdp[rd | 1];
sregs->fs[rd | 1] = sregs->fdp[rd & ~1];
default:
- ;
+ break;
}
#endif
if (sregs->fpstate == FP_EXC_PE) {
diff -uNr /home/joel/tools-original/gdb-6.5/sim/erc32/Makefile.in gdb-6.5/sim/erc32/Makefile.in
--- /home/joel/tools-original/gdb-6.5/sim/erc32/Makefile.in 2000-03-07 09:32:49.000000000 -0600
+++ gdb-6.5/sim/erc32/Makefile.in 2006-07-13 10:00:00.000000000 -0500
@@ -53,7 +53,7 @@
# Copy the files into directories where they will be run.
install-sis: installdirs
n=`echo sis | sed '$(program_transform_name)'`; \
- $(INSTALL_PROGRAM) sis$(EXEEXT) $(bindir)/$$n$(EXEEXT)
+ $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
clean-sis:
rm -f sis end end.h
diff -uNr /home/joel/tools-original/gdb-6.5/sim/Makefile.in gdb-6.5/sim/Makefile.in
--- /home/joel/tools-original/gdb-6.5/sim/Makefile.in 2006-05-05 12:11:19.000000000 -0500
+++ gdb-6.5/sim/Makefile.in 2006-07-13 10:00:00.000000000 -0500
@@ -84,6 +84,7 @@
"exec_prefix=$(exec_prefix)" \
"bindir=$(bindir)" \
"mandir=$(mandir)" \
+ "libdir=$(libdir)" \
"against=$(against)" \
"AR=$(AR)" \
"AR_FLAGS=$(AR_FLAGS)" \