source: rtems/contrib/crossrpms/patches/gdb-6.8-rtems4.9-20080428.diff @ bbe338e

4.104.114.95
Last change on this file since bbe338e was bbe338e, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/28/08 at 14:28:10

New.

  • Property mode set to 100644
File size: 20.1 KB
RevLine 
[bbe338e]1diff -Naur -x autom4te.cache gdb-6.8.orig/sim/common/aclocal.m4 gdb-6.8-rtems4.9-20080428/sim/common/aclocal.m4
2--- gdb-6.8.orig/sim/common/aclocal.m4  2006-06-13 10:06:48.000000000 +0200
3+++ gdb-6.8-rtems4.9-20080428/sim/common/aclocal.m4     2008-04-28 07:18:30.000000000 +0200
4@@ -18,7 +18,7 @@
5 #
6 # SIM_AC_OUTPUT
7 
8-AC_DEFUN(SIM_AC_COMMON,
9+AC_DEFUN([SIM_AC_COMMON],
10 [
11 # autoconf.info says this should be called right after AC_INIT.
12 AC_CONFIG_HEADER(ifelse([$1],,config.h,[$1]):config.in)
13@@ -245,7 +245,7 @@
14 dnl supported.
15 dnl ??? Until there is demonstrable value in doing something more complicated,
16 dnl let's not.
17-AC_DEFUN(SIM_AC_OPTION_ENVIRONMENT,
18+AC_DEFUN([SIM_AC_OPTION_ENVIRONMENT],
19 [
20 AC_ARG_ENABLE(sim-environment,
21 [  --enable-sim-environment=environment        Specify mixed, user, virtual or operating environment.],
22@@ -269,7 +269,7 @@
23 dnl Without this option all possible alignment restrictions are accommodated.
24 dnl arg[1] is hardwired target alignment
25 dnl arg[2] is default target alignment
26-AC_DEFUN(SIM_AC_OPTION_ALIGNMENT,
27+AC_DEFUN([SIM_AC_OPTION_ALIGNMENT],
28 wire_alignment="[$1]"
29 default_alignment="[$2]"
30 [
31@@ -318,7 +318,7 @@
32 
33 
34 dnl Conditionally compile in assertion statements.
35-AC_DEFUN(SIM_AC_OPTION_ASSERT,
36+AC_DEFUN([SIM_AC_OPTION_ASSERT],
37 [
38 AC_ARG_ENABLE(sim-assert,
39 [  --enable-sim-assert                 Specify whether to perform random assertions.],
40@@ -342,7 +342,7 @@
41 dnl arg[3] is the number of bits in an address
42 dnl arg[4] is the number of bits in an OpenFirmware cell.
43 dnl FIXME: this information should be obtained from bfd/archure
44-AC_DEFUN(SIM_AC_OPTION_BITSIZE,
45+AC_DEFUN([SIM_AC_OPTION_BITSIZE],
46 wire_word_bitsize="[$1]"
47 wire_word_msb="[$2]"
48 wire_address_bitsize="[$3]"
49@@ -408,7 +408,7 @@
50 dnl that support both big and little endian targets.
51 dnl arg[1] is hardwired target endianness.
52 dnl arg[2] is default target endianness.
53-AC_DEFUN(SIM_AC_OPTION_ENDIAN,
54+AC_DEFUN([SIM_AC_OPTION_ENDIAN],
55 [
56 wire_endian="[$1]"
57 default_endian="[$2]"
58@@ -458,7 +458,7 @@
59 dnl --enable-sim-hostendian is for users of the simulator when
60 dnl they find that AC_C_BIGENDIAN does not function correctly
61 dnl (for instance in a canadian cross)
62-AC_DEFUN(SIM_AC_OPTION_HOSTENDIAN,
63+AC_DEFUN([SIM_AC_OPTION_HOSTENDIAN],
64 [
65 AC_ARG_ENABLE(sim-hostendian,
66 [  --enable-sim-hostendian=end         Specify host byte endian orientation.],
67@@ -490,7 +490,7 @@
68 dnl And optionally the bitsize of the floating point register.
69 dnl arg[1] specifies the presence (or absence) of floating point hardware
70 dnl arg[2] specifies the number of bits in a floating point register
71-AC_DEFUN(SIM_AC_OPTION_FLOAT,
72+AC_DEFUN([SIM_AC_OPTION_FLOAT],
73 [
74 default_sim_float="[$1]"
75 default_sim_float_bitsize="[$2]"
76@@ -519,7 +519,7 @@
77 
78 
79 dnl The argument is the default cache size if none is specified.
80-AC_DEFUN(SIM_AC_OPTION_SCACHE,
81+AC_DEFUN([SIM_AC_OPTION_SCACHE],
82 [
83 default_sim_scache="ifelse([$1],,0,[$1])"
84 AC_ARG_ENABLE(sim-scache,
85@@ -539,7 +539,7 @@
86 
87 
88 dnl The argument is the default model if none is specified.
89-AC_DEFUN(SIM_AC_OPTION_DEFAULT_MODEL,
90+AC_DEFUN([SIM_AC_OPTION_DEFAULT_MODEL],
91 [
92 default_sim_default_model="ifelse([$1],,0,[$1])"
93 AC_ARG_ENABLE(sim-default-model,
94@@ -559,7 +559,7 @@
95 dnl arg[1] Enable sim-hw by default? ("yes" or "no")
96 dnl arg[2] is a space separated list of devices that override the defaults
97 dnl arg[3] is a space separated list of extra target specific devices.
98-AC_DEFUN(SIM_AC_OPTION_HARDWARE,
99+AC_DEFUN([SIM_AC_OPTION_HARDWARE],
100 [
101 if test x"[$1]" = x"yes"; then
102   sim_hw_p=yes
103@@ -621,7 +621,7 @@
104 dnl performance by inlining functions.
105 dnl Guarantee that unconfigured simulators do not do any inlining
106 sim_inline="-DDEFAULT_INLINE=0"
107-AC_DEFUN(SIM_AC_OPTION_INLINE,
108+AC_DEFUN([SIM_AC_OPTION_INLINE],
109 [
110 default_sim_inline="ifelse([$1],,,-DDEFAULT_INLINE=[$1])"
111 AC_ARG_ENABLE(sim-inline,
112@@ -666,7 +666,7 @@
113 AC_SUBST(sim_inline)
114 
115 
116-AC_DEFUN(SIM_AC_OPTION_PACKAGES,
117+AC_DEFUN([SIM_AC_OPTION_PACKAGES],
118 [
119 AC_ARG_ENABLE(sim-packages,
120 [  --enable-sim-packages=list          Specify the packages to be included in the build.],
121@@ -692,7 +692,7 @@
122 AC_SUBST(sim_packages)
123 
124 
125-AC_DEFUN(SIM_AC_OPTION_REGPARM,
126+AC_DEFUN([SIM_AC_OPTION_REGPARM],
127 [
128 AC_ARG_ENABLE(sim-regparm,
129 [  --enable-sim-regparm=nr-parm                Pass parameters in registers instead of on the stack - x86/GCC specific.],
130@@ -709,7 +709,7 @@
131 AC_SUBST(sim_regparm)
132 
133 
134-AC_DEFUN(SIM_AC_OPTION_RESERVED_BITS,
135+AC_DEFUN([SIM_AC_OPTION_RESERVED_BITS],
136 [
137 default_sim_reserved_bits="ifelse([$1],,1,[$1])"
138 AC_ARG_ENABLE(sim-reserved-bits,
139@@ -726,7 +726,7 @@
140 AC_SUBST(sim_reserved_bits)
141 
142 
143-AC_DEFUN(SIM_AC_OPTION_SMP,
144+AC_DEFUN([SIM_AC_OPTION_SMP],
145 [
146 default_sim_smp="ifelse([$1],,5,[$1])"
147 AC_ARG_ENABLE(sim-smp,
148@@ -746,7 +746,7 @@
149 AC_SUBST(sim_smp)
150 
151 
152-AC_DEFUN(SIM_AC_OPTION_STDCALL,
153+AC_DEFUN([SIM_AC_OPTION_STDCALL],
154 [
155 AC_ARG_ENABLE(sim-stdcall,
156 [  --enable-sim-stdcall=type           Use an alternative function call/return mechanism - x86/GCC specific.],
157@@ -763,7 +763,7 @@
158 AC_SUBST(sim_stdcall)
159 
160 
161-AC_DEFUN(SIM_AC_OPTION_XOR_ENDIAN,
162+AC_DEFUN([SIM_AC_OPTION_XOR_ENDIAN],
163 [
164 default_sim_xor_endian="ifelse([$1],,8,[$1])"
165 AC_ARG_ENABLE(sim-xor-endian,
166@@ -782,7 +782,7 @@
167 
168 dnl --enable-build-warnings is for developers of the simulator.
169 dnl it enables extra GCC specific warnings.
170-AC_DEFUN(SIM_AC_OPTION_WARNINGS,
171+AC_DEFUN([SIM_AC_OPTION_WARNINGS],
172 [
173 # NOTE: Don't add -Wall or -Wunused, they both include
174 # -Wunused-parameter which reports bogus warnings.
175@@ -866,7 +866,7 @@
176 dnl one afterwards.  The two pieces of the common fragment are inserted into
177 dnl the target's fragment at the appropriate points.
178 
179-AC_DEFUN(SIM_AC_OUTPUT,
180+AC_DEFUN([SIM_AC_OUTPUT],
181 [
182 AC_LINK_FILES($sim_link_files, $sim_link_links)
183 dnl Make @cgen_breaks@ non-null only if the sim uses CGEN.
184@@ -895,7 +895,7 @@
185 sinclude(../../config/gettext-sister.m4)
186 
187 dnl --enable-cgen-maint support
188-AC_DEFUN(SIM_AC_OPTION_CGEN_MAINT,
189+AC_DEFUN([SIM_AC_OPTION_CGEN_MAINT],
190 [
191 cgen_maint=no
192 dnl Default is to use one in build tree.
193diff -Naur -x autom4te.cache gdb-6.8.orig/sim/erc32/configure gdb-6.8-rtems4.9-20080428/sim/erc32/configure
194--- gdb-6.8.orig/sim/erc32/configure    2006-12-20 23:35:51.000000000 +0100
195+++ gdb-6.8-rtems4.9-20080428/sim/erc32/configure       2008-04-28 13:55:32.000000000 +0200
196@@ -309,7 +309,7 @@
197 # include <unistd.h>
198 #endif"
199 
200-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS sim_environment sim_alignment sim_assert sim_bitsize sim_endian sim_hostendian sim_float sim_scache sim_default_model sim_hw_cflags sim_hw_objs sim_hw sim_inline sim_packages sim_regparm sim_reserved_bits sim_smp sim_stdcall sim_xor_endian WARN_CFLAGS WERROR_CFLAGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC_FOR_BUILD HDEFINES AR RANLIB ac_ct_RANLIB USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CPP EGREP MAINT sim_bswap sim_cflags sim_debug sim_stdio sim_trace sim_profile TERMCAP READLINE cgen_breaks LIBOBJS LTLIBOBJS'
201+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS sim_environment sim_alignment sim_assert sim_bitsize sim_endian sim_hostendian sim_float sim_scache sim_default_model sim_hw_cflags sim_hw_objs sim_hw sim_inline sim_packages sim_regparm sim_reserved_bits sim_smp sim_stdcall sim_xor_endian WARN_CFLAGS WERROR_CFLAGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC_FOR_BUILD HDEFINES AR RANLIB ac_ct_RANLIB USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CPP EGREP MAINT sim_bswap sim_cflags sim_debug sim_stdio sim_trace sim_profile READLINE READLINE_DEPS READLINE_CFLAGS cgen_breaks LIBOBJS LTLIBOBJS'
202 ac_subst_files=''
203 
204 # Initialize some variables set by options.
205@@ -858,6 +858,11 @@
206   --enable-sim-trace=opts              Enable tracing flags
207   --enable-sim-profile=opts            Enable profiling flags
208 
209+Optional Packages:
210+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
211+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
212+  --with-system-readline  use installed readline library
213+
214 Some influential environment variables:
215   CC          C compiler command
216   CFLAGS      C compiler flags
217@@ -4493,45 +4498,22 @@
218 done
219 
220 
221-# In the Cygwin environment, we need some additional flags.
222-echo "$as_me:$LINENO: checking for cygwin" >&5
223-echo $ECHO_N "checking for cygwin... $ECHO_C" >&6
224-if test "${sim_cv_os_cygwin+set}" = set; then
225-  echo $ECHO_N "(cached) $ECHO_C" >&6
226-else
227-  cat >conftest.$ac_ext <<_ACEOF
228-/* confdefs.h.  */
229-_ACEOF
230-cat confdefs.h >>conftest.$ac_ext
231-cat >>conftest.$ac_ext <<_ACEOF
232-/* end confdefs.h.  */
233 
234-#ifdef __CYGWIN__
235-lose
236-#endif
237-_ACEOF
238-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
239-  $EGREP "lose" >/dev/null 2>&1; then
240-  sim_cv_os_cygwin=yes
241-else
242-  sim_cv_os_cygwin=no
243-fi
244-rm -f conftest*
245+# Check whether --with-system-readline or --without-system-readline was given.
246+if test "${with_system_readline+set}" = set; then
247+  withval="$with_system_readline"
248 
249-fi
250-echo "$as_me:$LINENO: result: $sim_cv_os_cygwin" >&5
251-echo "${ECHO_T}$sim_cv_os_cygwin" >&6
252+fi;
253 
254-if test x$sim_cv_os_cygwin = xyes; then
255-  TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
256-else
257-  echo "$as_me:$LINENO: checking for main in -ltermcap" >&5
258-echo $ECHO_N "checking for main in -ltermcap... $ECHO_C" >&6
259-if test "${ac_cv_lib_termcap_main+set}" = set; then
260+if test "$with_system_readline" = yes; then
261+  save_LIBS="$LIBS"
262+  echo "$as_me:$LINENO: checking for library containing readline" >&5
263+echo $ECHO_N "checking for library containing readline... $ECHO_C" >&6
264+if test "${ac_cv_search_readline+set}" = set; then
265   echo $ECHO_N "(cached) $ECHO_C" >&6
266 else
267-  ac_check_lib_save_LIBS=$LIBS
268-LIBS="-ltermcap  $LIBS"
269+  ac_func_search_save_LIBS=$LIBS
270+ac_cv_search_readline=no
271 cat >conftest.$ac_ext <<_ACEOF
272 /* confdefs.h.  */
273 _ACEOF
274@@ -4539,11 +4521,17 @@
275 cat >>conftest.$ac_ext <<_ACEOF
276 /* end confdefs.h.  */
277 
278-
279+/* Override any gcc2 internal prototype to avoid an error.  */
280+#ifdef __cplusplus
281+extern "C"
282+#endif
283+/* We use char because int might match the return type of a gcc2
284+   builtin and then its argument prototype would still apply.  */
285+char readline ();
286 int
287 main ()
288 {
289-main ();
290+readline ();
291   ;
292   return 0;
293 }
294@@ -4570,41 +4558,18 @@
295   ac_status=$?
296   echo "$as_me:$LINENO: \$? = $ac_status" >&5
297   (exit $ac_status); }; }; then
298-  ac_cv_lib_termcap_main=yes
299+  ac_cv_search_readline="none required"
300 else
301   echo "$as_me: failed program was:" >&5
302 sed 's/^/| /' conftest.$ac_ext >&5
303 
304-ac_cv_lib_termcap_main=no
305 fi
306 rm -f conftest.err conftest.$ac_objext \
307       conftest$ac_exeext conftest.$ac_ext
308-LIBS=$ac_check_lib_save_LIBS
309-fi
310-echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_main" >&5
311-echo "${ECHO_T}$ac_cv_lib_termcap_main" >&6
312-if test $ac_cv_lib_termcap_main = yes; then
313-  TERMCAP=-ltermcap
314-else
315-  TERMCAP=""
316-fi
317-
318-fi
319-
320-
321-# We prefer the in-tree readline.  Top-level dependencies make sure
322-# src/readline (if it's there) is configured before src/sim.
323-if test -r ../../readline/Makefile; then
324-  READLINE=../../readline/libreadline.a
325-else
326-  echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
327-echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
328-if test "${ac_cv_lib_readline_readline+set}" = set; then
329-  echo $ECHO_N "(cached) $ECHO_C" >&6
330-else
331-  ac_check_lib_save_LIBS=$LIBS
332-LIBS="-lreadline $TERMCAP $LIBS"
333-cat >conftest.$ac_ext <<_ACEOF
334+if test "$ac_cv_search_readline" = no; then
335+  for ac_lib in readline; do
336+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
337+    cat >conftest.$ac_ext <<_ACEOF
338 /* confdefs.h.  */
339 _ACEOF
340 cat confdefs.h >>conftest.$ac_ext
341@@ -4648,29 +4613,40 @@
342   ac_status=$?
343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
344   (exit $ac_status); }; }; then
345-  ac_cv_lib_readline_readline=yes
346+  ac_cv_search_readline="-l$ac_lib"
347+break
348 else
349   echo "$as_me: failed program was:" >&5
350 sed 's/^/| /' conftest.$ac_ext >&5
351 
352-ac_cv_lib_readline_readline=no
353 fi
354 rm -f conftest.err conftest.$ac_objext \
355       conftest$ac_exeext conftest.$ac_ext
356-LIBS=$ac_check_lib_save_LIBS
357+  done
358 fi
359-echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
360-echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
361-if test $ac_cv_lib_readline_readline = yes; then
362-  READLINE=-lreadline
363-else
364-  { { echo "$as_me:$LINENO: error: the required \"readline\" library is missing" >&5
365-echo "$as_me: error: the required \"readline\" library is missing" >&2;}
366-   { (exit 1); exit 1; }; }
367+LIBS=$ac_func_search_save_LIBS
368 fi
369+echo "$as_me:$LINENO: result: $ac_cv_search_readline" >&5
370+echo "${ECHO_T}$ac_cv_search_readline" >&6
371+if test "$ac_cv_search_readline" != no; then
372+  test "$ac_cv_search_readline" = "none required" || LIBS="$ac_cv_search_readline $LIBS"
373+
374+    READLINE=-lreadline
375+    READLINE_DEPS=
376+    READLINE_CFLAGS=
377 
378 fi
379 
380+  LIBS="$save_LIBS"
381+else
382+  READLINE='$(READLINE_DIR)/libreadline.a'
383+  READLINE_DEPS='$(READLINE)'
384+  READLINE_CFLAGS='-I$(READLINE_SRC)/..'
385+fi
386+
387+
388+
389+
390 
391 ac_sources="$sim_link_files"
392 ac_dests="$sim_link_links"
393@@ -5389,8 +5365,9 @@
394 s,@sim_stdio@,$sim_stdio,;t t
395 s,@sim_trace@,$sim_trace,;t t
396 s,@sim_profile@,$sim_profile,;t t
397-s,@TERMCAP@,$TERMCAP,;t t
398 s,@READLINE@,$READLINE,;t t
399+s,@READLINE_DEPS@,$READLINE_DEPS,;t t
400+s,@READLINE_CFLAGS@,$READLINE_CFLAGS,;t t
401 s,@cgen_breaks@,$cgen_breaks,;t t
402 s,@LIBOBJS@,$LIBOBJS,;t t
403 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
404diff -Naur -x autom4te.cache gdb-6.8.orig/sim/erc32/configure.ac gdb-6.8-rtems4.9-20080428/sim/erc32/configure.ac
405--- gdb-6.8.orig/sim/erc32/configure.ac 2006-12-20 23:35:51.000000000 +0100
406+++ gdb-6.8-rtems4.9-20080428/sim/erc32/configure.ac    2008-04-28 13:55:17.000000000 +0200
407@@ -11,27 +11,25 @@
408 
409 AC_CHECK_HEADERS(stdlib.h)
410 
411-# In the Cygwin environment, we need some additional flags.
412-AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
413-[AC_EGREP_CPP(lose, [
414-#ifdef __CYGWIN__
415-lose
416-#endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
417+AC_ARG_WITH([system-readline],
418+  [AS_HELP_STRING([--with-system-readline],
419+                  [use installed readline library])])
420 
421-if test x$sim_cv_os_cygwin = xyes; then
422-  TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
423+if test "$with_system_readline" = yes; then
424+  save_LIBS="$LIBS"
425+  AC_SEARCH_LIBS([readline],[readline],[
426+    READLINE=-lreadline
427+    READLINE_DEPS=
428+    READLINE_CFLAGS=
429+    ],[])
430+  LIBS="$save_LIBS"
431 else
432-  AC_CHECK_LIB(termcap, main, TERMCAP=-ltermcap, TERMCAP="")
433-fi
434-AC_SUBST(TERMCAP)
435-
436-# We prefer the in-tree readline.  Top-level dependencies make sure
437-# src/readline (if it's there) is configured before src/sim.
438-if test -r ../../readline/Makefile; then
439-  READLINE=../../readline/libreadline.a
440-else
441-  AC_CHECK_LIB(readline, readline, READLINE=-lreadline,
442-              AC_ERROR([the required "readline" library is missing]), $TERMCAP)
443+  READLINE='$(READLINE_DIR)/libreadline.a'
444+  READLINE_DEPS='$(READLINE)'
445+  READLINE_CFLAGS='-I$(READLINE_SRC)/..'
446 fi
447 AC_SUBST(READLINE)
448+AC_SUBST(READLINE_DEPS)
449+AC_SUBST(READLINE_CFLAGS)
450+
451 SIM_AC_OUTPUT
452diff -Naur -x autom4te.cache gdb-6.8.orig/sim/erc32/erc32.c gdb-6.8-rtems4.9-20080428/sim/erc32/erc32.c
453--- gdb-6.8.orig/sim/erc32/erc32.c      1999-04-16 03:35:00.000000000 +0200
454+++ gdb-6.8-rtems4.9-20080428/sim/erc32/erc32.c 2008-04-28 07:18:30.000000000 +0200
455@@ -24,6 +24,7 @@
456 
457 #include <sys/types.h>
458 #include <stdio.h>
459+#include <string.h>
460 #include <termios.h>
461 #include <sys/fcntl.h>
462 #include <sys/file.h>
463@@ -413,7 +414,7 @@
464     if (rom8) mec_memcfg &= ~0x20000;
465     else mec_memcfg |= 0x20000;
466 
467-    mem_ramsz = (256 * 1024) << ((mec_memcfg >> 10) & 7);
468+    mem_ramsz = (512 * 1024) << ((mec_memcfg >> 10) & 7);
469     mem_romsz = (128 * 1024) << ((mec_memcfg >> 18) & 7);
470 
471     if (sparclite_board) {
472@@ -1659,7 +1660,7 @@
473        errmec = 0;
474        return(1);
475     }
476-#endif;
477+#endif
478 
479     if ((addr >= mem_ramstart) && (addr < (mem_ramstart + mem_ramsz))) {
480        fetch_bytes (asi, &ramb[addr & mem_rammask], data, sz);
481@@ -1736,7 +1737,7 @@
482        errmec = 0;
483        return(1);
484     }
485-#endif;
486+#endif
487 
488     if ((addr >= mem_ramstart) && (addr < (mem_ramstart + mem_ramsz))) {
489        if (mem_accprot) {
490diff -Naur -x autom4te.cache gdb-6.8.orig/sim/erc32/exec.c gdb-6.8-rtems4.9-20080428/sim/erc32/exec.c
491--- gdb-6.8.orig/sim/erc32/exec.c       2005-03-07 12:09:05.000000000 +0100
492+++ gdb-6.8-rtems4.9-20080428/sim/erc32/exec.c  2008-04-28 07:18:30.000000000 +0200
493@@ -1713,7 +1713,7 @@
494            sregs->fdp[rs2 | 1] = sregs->fs[rs2 & ~1];
495            sregs->fdp[rs2 & ~1] = sregs->fs[rs2 | 1];
496     default:
497-      ;
498+      break;
499     }
500 #endif
501 
502@@ -1886,7 +1886,7 @@
503        sregs->fs[rd & ~1] = sregs->fdp[rd | 1];
504        sregs->fs[rd | 1] = sregs->fdp[rd & ~1];
505     default:
506-      ;
507+      break;
508     }
509 #endif
510     if (sregs->fpstate == FP_EXC_PE) {
511diff -Naur -x autom4te.cache gdb-6.8.orig/sim/erc32/Makefile.in gdb-6.8-rtems4.9-20080428/sim/erc32/Makefile.in
512--- gdb-6.8.orig/sim/erc32/Makefile.in  2008-01-01 23:53:24.000000000 +0100
513+++ gdb-6.8-rtems4.9-20080428/sim/erc32/Makefile.in     2008-04-28 07:18:30.000000000 +0200
514@@ -18,12 +18,12 @@
515 
516 ## COMMON_PRE_CONFIG_FRAG
517 
518-TERMCAP_LIB = @TERMCAP@
519+# TERMCAP_LIB = -lncurses
520 READLINE_LIB = @READLINE@
521 
522 SIM_OBJS = exec.o erc32.o func.o help.o float.o interf.o
523 SIM_EXTRA_LIBS = $(READLINE_LIB) $(TERMCAP_LIB) -lm
524-SIM_EXTRA_ALL = sis
525+SIM_EXTRA_ALL = sis$(EXEEXT)
526 SIM_EXTRA_INSTALL = install-sis
527 SIM_EXTRA_CLEAN = clean-sis
528 
529@@ -37,8 +37,8 @@
530 # `sis' doesn't need interf.o.
531 SIS_OFILES = exec.o erc32.o func.o help.o float.o
532 
533-sis: sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
534-       $(CC) $(ALL_CFLAGS) -o sis \
535+sis$(EXEEXT): sis.o $(SIS_OFILES) $(COMMON_OBJS) $(LIBDEPS)
536+       $(CC) $(ALL_CFLAGS) -o sis$(EXEEXT) \
537          sis.o $(SIS_OFILES) $(COMMON_OBJS) $(EXTRA_LIBS)
538 
539 # FIXME: This computes the build host's endianness, doesn't it?
540@@ -51,11 +51,11 @@
541 
542 # Copy the files into directories where they will be run.
543 install-sis: installdirs
544-       n=`echo sis | sed '$(program_transform_name)'`; \
545-       $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
546+       n=`echo sis$(EXEEXT) | sed '$(program_transform_name)'`; \
547+       $(INSTALL_PROGRAM) sis$(EXEEXT) $(DESTDIR)$(bindir)/$$n
548 
549 clean-sis:
550-       rm -f sis end end.h
551+       rm -f sis$(EXEEXT) end end.h
552 
553 configure:
554        @echo "Rebuilding configure..."
555diff -Naur -x autom4te.cache gdb-6.8.orig/sim/ppc/ppc-instructions gdb-6.8-rtems4.9-20080428/sim/ppc/ppc-instructions
556--- gdb-6.8.orig/sim/ppc/ppc-instructions       2006-11-29 16:20:55.000000000 +0100
557+++ gdb-6.8-rtems4.9-20080428/sim/ppc/ppc-instructions  2008-04-28 07:18:30.000000000 +0200
558@@ -3402,6 +3402,14 @@
559            case spr_dec:
560              *rT = cpu_get_decrementer(processor);
561              break;
562+               case spr_tbrl:
563+                 if (is_64bit_implementation) *rT = TB;
564+                 else                         *rT = EXTRACTED64(TB, 32, 63);
565+               break;
566+               case spr_tbru:
567+                 if (is_64bit_implementation) *rT = EXTRACTED64(TB, 0, 31);
568+                 else                         *rT = EXTRACTED64(TB, 0, 31);
569+               break;
570            case spr_tbu:
571            case spr_tbl:
572              /* NOTE - these SPR's are not readable. Use mftb[ul] */
573diff -Naur -x autom4te.cache gdb-6.8.orig/sim/ppc/ppc-spr-table gdb-6.8-rtems4.9-20080428/sim/ppc/ppc-spr-table
574--- gdb-6.8.orig/sim/ppc/ppc-spr-table  2003-06-22 18:48:12.000000000 +0200
575+++ gdb-6.8-rtems4.9-20080428/sim/ppc/ppc-spr-table     2008-04-28 07:18:30.000000000 +0200
576@@ -32,6 +32,8 @@
577 SRR0:26:0:0
578 SRR1:27:0:0
579 VRSAVE:256:0:0
580+TBRL:268:0:0
581+TBRU:269:0:0
582 SPRG0:272:0:0
583 SPRG1:273:0:0
584 SPRG2:274:0:0
Note: See TracBrowser for help on using the repository browser.