Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit bd5585dc1a0c70fa6559ee146e727d808c7ca226 Ake Sandgren committed Jul 6, 2011
Showing with 45,228 additions and 0 deletions.
  1. +1 −0 .gdbinit
  2. +22,041 −0 ChangeLog
  3. +244 −0 Makefile.in
  4. +202 −0 TODO
  5. +35 −0 aclocal.m4
  6. +1 −0 config/arm-ice.exp
  7. +17 −0 config/cfdbug.exp
  8. +1 −0 config/cygmon.exp
  9. +16 −0 config/d10v.exp
  10. +16 −0 config/default.exp
  11. +19 −0 config/dve.exp
  12. +87 −0 config/gdbserver.exp
  13. +1 −0 config/h8300.exp
  14. +1 −0 config/i386-bozo.exp
  15. +16 −0 config/i960.exp
  16. +1 −0 config/m32r-stub.exp
  17. +19 −0 config/m32r.exp
  18. +17 −0 config/mips-idt.exp
  19. +17 −0 config/mips.exp
  20. +19 −0 config/mn10300-eval.exp
  21. +259 −0 config/monitor.exp
  22. +16 −0 config/proelf.exp
  23. +16 −0 config/rom68k.exp
  24. +16 −0 config/sh.exp
  25. +218 −0 config/sid.exp
  26. +88 −0 config/sim.exp
  27. +180 −0 config/slite.exp
  28. +26 −0 config/unix.exp
  29. +16 −0 config/vr4300.exp
  30. +16 −0 config/vr5000.exp
  31. +127 −0 config/vx.exp
  32. +16 −0 config/vxworks.exp
  33. +24 −0 config/vxworks29k.exp
  34. +4,822 −0 configure
  35. +149 −0 configure.ac
  36. +423 −0 dg-extract-results.sh
  37. +63 −0 gdb.ada/Makefile.in
  38. +58 −0 gdb.ada/array_bounds.exp
  39. +27 −0 gdb.ada/array_bounds/bar.adb
  40. +101 −0 gdb.ada/array_return.exp
  41. +28 −0 gdb.ada/array_return/p.adb
  42. +33 −0 gdb.ada/array_return/pck.adb
  43. +28 −0 gdb.ada/array_return/pck.ads
  44. +45 −0 gdb.ada/array_subscript_addr.exp
  45. +29 −0 gdb.ada/array_subscript_addr/p.adb
  46. +114 −0 gdb.ada/arrayidx.exp
  47. +54 −0 gdb.ada/arrayidx/p.adb
  48. +61 −0 gdb.ada/arrayparam.exp
  49. +26 −0 gdb.ada/arrayparam/foo.adb
  50. +28 −0 gdb.ada/arrayparam/pck.adb
  51. +25 −0 gdb.ada/arrayparam/pck.ads
  52. +46 −0 gdb.ada/arrayptr.exp
  53. +24 −0 gdb.ada/arrayptr/foo.adb
  54. +23 −0 gdb.ada/arrayptr/pck.adb
  55. +22 −0 gdb.ada/arrayptr/pck.ads
  56. +35 −0 gdb.ada/assign_1.exp
  57. +47 −0 gdb.ada/atomic_enum.exp
  58. +23 −0 gdb.ada/atomic_enum/foo.adb
  59. +37 −0 gdb.ada/atomic_enum/pck.adb
  60. +21 −0 gdb.ada/atomic_enum/pck.ads
  61. +41 −0 gdb.ada/boolean_expr.exp
  62. +53 −0 gdb.ada/call_pn.exp
  63. +23 −0 gdb.ada/call_pn/foo.adb
  64. +25 −0 gdb.ada/call_pn/pck.adb
  65. +23 −0 gdb.ada/call_pn/pck.ads
  66. +151 −0 gdb.ada/catch_ex.exp
  67. +43 −0 gdb.ada/catch_ex/foo.adb
  68. +65 −0 gdb.ada/char_param.exp
  69. +27 −0 gdb.ada/char_param/foo.adb
  70. +33 −0 gdb.ada/char_param/pck.adb
  71. +27 −0 gdb.ada/char_param/pck.ads
  72. +189 −0 gdb.ada/complete.exp
  73. +10 −0 gdb.ada/complete/foo.adb
  74. +9 −0 gdb.ada/complete/pck.adb
  75. +19 −0 gdb.ada/complete/pck.ads
  76. +58 −0 gdb.ada/cond_lang.exp
  77. +21 −0 gdb.ada/cond_lang/a.adb
  78. +25 −0 gdb.ada/cond_lang/foo.c
  79. +49 −0 gdb.ada/cond_lang/mixed.adb
  80. +20 −0 gdb.ada/cond_lang/mixed.ads
  81. +21 −0 gdb.ada/cond_lang/pck.adb
  82. +20 −0 gdb.ada/cond_lang/pck.ads
  83. +53 −0 gdb.ada/dyn_loc.exp
  84. +21 −0 gdb.ada/dyn_loc/p.adb
  85. +29 −0 gdb.ada/dyn_loc/pack.adb
  86. +20 −0 gdb.ada/dyn_loc/pack.ads
  87. +86 −0 gdb.ada/exec_changed.exp
  88. +19 −0 gdb.ada/exec_changed/first.adb
  89. +19 −0 gdb.ada/exec_changed/second.adb
  90. +50 −0 gdb.ada/exprs.exp
  91. +41 −0 gdb.ada/exprs/p.adb
  92. +57 −0 gdb.ada/fixed_cmp.exp
  93. +24 −0 gdb.ada/fixed_cmp/fixed.adb
  94. +23 −0 gdb.ada/fixed_cmp/pck.adb
  95. +22 −0 gdb.ada/fixed_cmp/pck.ads
  96. +62 −0 gdb.ada/fixed_points.exp
  97. +63 −0 gdb.ada/fixed_points/fixed_points.adb
  98. +109 −0 gdb.ada/formatted_ref.exp
  99. +23 −0 gdb.ada/formatted_ref/defs.adb
  100. +27 −0 gdb.ada/formatted_ref/defs.ads
  101. +21 −0 gdb.ada/formatted_ref/formatted_ref.adb
  102. +56 −0 gdb.ada/frame_args.exp
  103. +23 −0 gdb.ada/frame_args/foo.adb
  104. +36 −0 gdb.ada/frame_args/pck.adb
  105. +37 −0 gdb.ada/frame_args/pck.ads
  106. +44 −0 gdb.ada/fun_addr.exp
  107. +19 −0 gdb.ada/fun_addr/foo.adb
  108. +55 −0 gdb.ada/fun_in_declare.exp
  109. +28 −0 gdb.ada/fun_in_declare/foo.adb
  110. +21 −0 gdb.ada/fun_in_declare/pck.adb
  111. +18 −0 gdb.ada/fun_in_declare/pck.ads
  112. +46 −0 gdb.ada/funcall_param.exp
  113. +22 −0 gdb.ada/funcall_param/foo.adb
  114. +28 −0 gdb.ada/funcall_param/pck.adb
  115. +28 −0 gdb.ada/funcall_param/pck.ads
  116. +25 −0 gdb.ada/gnat_ada.gpr
  117. +94 −0 gdb.ada/homonym.exp
  118. +61 −0 gdb.ada/homonym/homonym.adb
  119. +20 −0 gdb.ada/homonym/homonym.ads
  120. +21 −0 gdb.ada/homonym/homonym_main.adb
  121. +35 −0 gdb.ada/info_types.c
  122. +31 −0 gdb.ada/info_types.exp
  123. +45 −0 gdb.ada/int_deref.exp
  124. +21 −0 gdb.ada/int_deref/foo.adb
  125. +20 −0 gdb.ada/int_deref/pck.ads
  126. +48 −0 gdb.ada/interface.exp
  127. +25 −0 gdb.ada/interface/foo.adb
  128. +29 −0 gdb.ada/interface/types.adb
  129. +42 −0 gdb.ada/interface/types.ads
  130. +58 −0 gdb.ada/lang_switch.exp
  131. +22 −0 gdb.ada/lang_switch/foo.c
  132. +34 −0 gdb.ada/lang_switch/lang_switch.adb
  133. +47 −0 gdb.ada/mod_from_name.exp
  134. +36 −0 gdb.ada/mod_from_name/foo.adb
  135. +45 −0 gdb.ada/nested.exp
  136. +36 −0 gdb.ada/nested/hello.adb
  137. +50 −0 gdb.ada/null_array.exp
  138. +31 −0 gdb.ada/null_array/foo.adb
  139. +28 −0 gdb.ada/null_array/pck.adb
  140. +24 −0 gdb.ada/null_array/pck.ads
  141. +50 −0 gdb.ada/null_record.exp
  142. +23 −0 gdb.ada/null_record/bar.adb
  143. +23 −0 gdb.ada/null_record/bar.ads
  144. +23 −0 gdb.ada/null_record/null_record.adb
  145. +55 −0 gdb.ada/packed_array.exp
  146. +28 −0 gdb.ada/packed_array/pa.adb
  147. +65 −0 gdb.ada/packed_tagged.exp
  148. +40 −0 gdb.ada/packed_tagged/comp_bug.adb
  149. +53 −0 gdb.ada/print_chars.exp
  150. +11 −0 gdb.ada/print_chars/foo.adb
  151. +23 −0 gdb.ada/print_chars/pck.adb
  152. +22 −0 gdb.ada/print_chars/pck.ads
  153. +48 −0 gdb.ada/print_pc.exp
  154. +35 −0 gdb.ada/ptype_arith_binop.exp
  155. +70 −0 gdb.ada/ptype_field.exp
  156. +22 −0 gdb.ada/ptype_field/foo.adb
  157. +23 −0 gdb.ada/ptype_field/pck.adb
  158. +30 −0 gdb.ada/ptype_field/pck.ads
  159. +47 −0 gdb.ada/ptype_tagged_param.exp
  160. +23 −0 gdb.ada/ptype_tagged_param/foo.adb
  161. +30 −0 gdb.ada/ptype_tagged_param/pck.adb
  162. +29 −0 gdb.ada/ptype_tagged_param/pck.ads
  163. +46 −0 gdb.ada/rec_return.exp
  164. +24 −0 gdb.ada/rec_return/foo.adb
  165. +27 −0 gdb.ada/rec_return/pck.adb
  166. +28 −0 gdb.ada/rec_return/pck.ads
  167. +48 −0 gdb.ada/ref_param.exp
  168. +22 −0 gdb.ada/ref_param/foo.adb
  169. +25 −0 gdb.ada/ref_param/pck.adb
  170. +29 −0 gdb.ada/ref_param/pck.ads
  171. +48 −0 gdb.ada/ref_tick_size.exp
  172. +29 −0 gdb.ada/ref_tick_size/p.adb
  173. +25 −0 gdb.ada/ref_tick_size/pck.adb
  174. +22 −0 gdb.ada/ref_tick_size/pck.ads
  175. +47 −0 gdb.ada/start.exp
  176. +19 −0 gdb.ada/start/dummy.adb
  177. +49 −0 gdb.ada/str_ref_cmp.exp
  178. +21 −0 gdb.ada/str_ref_cmp/foo.adb
  179. +20 −0 gdb.ada/str_ref_cmp/pck.ads
  180. +73 −0 gdb.ada/sym_print_name.exp
  181. +22 −0 gdb.ada/sym_print_name/foo.adb
  182. +21 −0 gdb.ada/sym_print_name/pck.adb
  183. +26 −0 gdb.ada/sym_print_name/pck.ads
  184. +46 −0 gdb.ada/taft_type.exp
  185. +23 −0 gdb.ada/taft_type/p.adb
  186. +29 −0 gdb.ada/taft_type/pck.adb
  187. +31 −0 gdb.ada/taft_type/pck.ads
  188. +76 −0 gdb.ada/tagged.exp
  189. +24 −0 gdb.ada/tagged/foo.adb
  190. +25 −0 gdb.ada/tagged/pck.adb
  191. +32 −0 gdb.ada/tagged/pck.ads
  192. +79 −0 gdb.ada/tasks.exp
  193. +68 −0 gdb.ada/tasks/foo.adb
  194. +49 −0 gdb.ada/tick_last_segv.exp
  195. +19 −0 gdb.ada/tick_last_segv/foo.adb
  196. +61 −0 gdb.ada/type_coercion.exp
  197. +25 −0 gdb.ada/type_coercion/assign.adb
  198. +19 −0 gdb.ada/type_coercion/ident.adb
  199. +54 −0 gdb.ada/uninitialized_vars.exp
  200. +130 −0 gdb.ada/uninitialized_vars/parse.adb
  201. +35 −0 gdb.ada/uninitialized_vars/parse_controlled.ads
  202. +43 −0 gdb.ada/variant_record_packed_array.exp
  203. +32 −0 gdb.ada/variant_record_packed_array/foo.adb
  204. +20 −0 gdb.ada/variant_record_packed_array/pck.adb
  205. +18 −0 gdb.ada/variant_record_packed_array/pck.ads
  206. +61 −0 gdb.ada/watch_arg.exp
  207. +29 −0 gdb.ada/watch_arg/watch.adb
  208. +17 −0 gdb.arch/Makefile.in
  209. +116 −0 gdb.arch/alpha-step.c
  210. +111 −0 gdb.arch/alpha-step.exp
  211. +141 −0 gdb.arch/altivec-abi.c
  212. +159 −0 gdb.arch/altivec-abi.exp
  213. +41 −0 gdb.arch/altivec-regs.c
  214. +234 −0 gdb.arch/altivec-regs.exp
  215. +141 −0 gdb.arch/amd64-byte.exp
  216. +181 −0 gdb.arch/amd64-disp-step.S
  217. +237 −0 gdb.arch/amd64-disp-step.exp
  218. +121 −0 gdb.arch/amd64-dword.exp
  219. +24 −0 gdb.arch/amd64-i386-address.S
  220. +43 −0 gdb.arch/amd64-i386-address.exp
  221. +91 −0 gdb.arch/amd64-pseudo.c
  222. +121 −0 gdb.arch/amd64-word.exp
  223. +106 −0 gdb.arch/e500-abi.c
  224. +85 −0 gdb.arch/e500-abi.exp
  225. +52 −0 gdb.arch/e500-prologue.c
  226. +79 −0 gdb.arch/e500-prologue.exp
  227. +38 −0 gdb.arch/e500-regs.c
  228. +220 −0 gdb.arch/e500-regs.exp
  229. +70 −0 gdb.arch/gcore.c
  230. +90 −0 gdb.arch/gdb1291.exp
  231. +128 −0 gdb.arch/gdb1291.s
  232. +61 −0 gdb.arch/gdb1431.exp
  233. +128 −0 gdb.arch/gdb1431.s
  234. +37 −0 gdb.arch/gdb1558.c
  235. +70 −0 gdb.arch/gdb1558.exp
  236. +128 −0 gdb.arch/i386-avx.c
  237. +108 −0 gdb.arch/i386-avx.exp
  238. +104 −0 gdb.arch/i386-bp_permanent.exp
  239. +96 −0 gdb.arch/i386-byte.exp
  240. +200 −0 gdb.arch/i386-cpuid.h
  241. +123 −0 gdb.arch/i386-disp-step.S
  242. +168 −0 gdb.arch/i386-disp-step.exp
  243. +355 −0 gdb.arch/i386-gnu-cfi-asm.S
  244. +29 −0 gdb.arch/i386-gnu-cfi.c
  245. +91 −0 gdb.arch/i386-gnu-cfi.exp
  246. +30 −0 gdb.arch/i386-permbkpt.S
  247. +52 −0 gdb.arch/i386-permbkpt.exp
  248. +166 −0 gdb.arch/i386-prologue.c
  249. +236 −0 gdb.arch/i386-prologue.exp
  250. +51 −0 gdb.arch/i386-pseudo.c
  251. +58 −0 gdb.arch/i386-signal.c
  252. +42 −0 gdb.arch/i386-signal.exp
  253. +51 −0 gdb.arch/i386-size-overlap.c
  254. +75 −0 gdb.arch/i386-size-overlap.exp
  255. +48 −0 gdb.arch/i386-size.c
  256. +88 −0 gdb.arch/i386-size.exp
  257. +125 −0 gdb.arch/i386-sse.c
  258. +108 −0 gdb.arch/i386-sse.exp
  259. +46 −0 gdb.arch/i386-unwind.c
  260. +74 −0 gdb.arch/i386-unwind.exp
  261. +82 −0 gdb.arch/i386-word.exp
  262. +44 −0 gdb.arch/ia64-breakpoint-shadow.S
  263. +80 −0 gdb.arch/ia64-breakpoint-shadow.exp
  264. +86 −0 gdb.arch/iwmmxt-regs.c
  265. +77 −0 gdb.arch/iwmmxt-regs.exp
  266. +161 −0 gdb.arch/pa-nullify.exp
  267. +58 −0 gdb.arch/pa-nullify.s
  268. +70 −0 gdb.arch/pa64-nullify.s
  269. +184 −0 gdb.arch/powerpc-aix-prologue.c
  270. +84 −0 gdb.arch/powerpc-aix-prologue.exp
  271. +25 −0 gdb.arch/powerpc-d128-regs.c
  272. +76 −0 gdb.arch/powerpc-d128-regs.exp
  273. +82 −0 gdb.arch/powerpc-prologue.c
  274. +88 −0 gdb.arch/powerpc-prologue.exp
  275. +46 −0 gdb.arch/ppc-dfp.c
  276. +79 −0 gdb.arch/ppc-dfp.exp
  277. +36 −0 gdb.arch/ppc-fp.c
  278. +97 −0 gdb.arch/ppc-fp.exp
  279. +44 −0 gdb.arch/ppc64-atomic-inst.c
  280. +64 −0 gdb.arch/ppc64-atomic-inst.exp
  281. +234 −0 gdb.arch/spu-info.c
  282. +247 −0 gdb.arch/spu-info.exp
  283. +31 −0 gdb.arch/spu-ls.c
  284. +54 −0 gdb.arch/spu-ls.exp
  285. +236 −0 gdb.arch/system-gcore.exp
  286. +106 −0 gdb.arch/thumb-prologue.c
  287. +61 −0 gdb.arch/thumb-prologue.exp
  288. +182 −0 gdb.arch/thumb2-it.S
  289. +163 −0 gdb.arch/thumb2-it.exp
  290. +41 −0 gdb.arch/vsx-regs.c
  291. +187 −0 gdb.arch/vsx-regs.exp
  292. +19 −0 gdb.asm/Makefile.in
  293. +65 −0 gdb.asm/alpha.inc
  294. +35 −0 gdb.asm/arm.inc
  295. +444 −0 gdb.asm/asm-source.exp
  296. +86 −0 gdb.asm/asmsrc1.s
  297. +21 −0 gdb.asm/asmsrc2.s
  298. +40 −0 gdb.asm/common.inc
  299. +1 −0 gdb.asm/empty.inc
  300. +55 −0 gdb.asm/frv.inc
Sorry, we could not display the entire diff because too many files (1,554) changed.
1 .gdbinit
@@ -0,0 +1 @@
+set height 400
22,041 ChangeLog
22,041 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
244 Makefile.in
@@ -0,0 +1,244 @@
+# Makefile for regression testing the GNU debugger.
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003, 2004,
+# 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This file is part of GDB.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+abs_builddir = @abs_builddir@
+
+target_alias = @target_noncanonical@
+program_transform_name = @program_transform_name@
+build_canonical = @build@
+host_canonical = @host@
+target_canonical = @target@
+
+SHELL = @SHELL@
+EXEEXT = @EXEEXT@
+SUBDIRS = @subdirs@
+RPATH_ENVVAR = @RPATH_ENVVAR@
+ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.cp gdb.disasm \
+ gdb.dwarf2 \
+ gdb.fortran gdb.server gdb.java gdb.mi gdb.multi \
+ gdb.objc gdb.opt gdb.pascal gdb.python gdb.threads gdb.trace \
+ gdb.xml \
+ $(SUBDIRS)
+
+EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
+ echo $${rootme}/../../expect/expect ; \
+ else echo expect ; fi`
+
+RUNTEST = $(RUNTEST_FOR_TARGET)
+
+RUNTESTFLAGS =
+
+FORCE_PARALLEL =
+
+RUNTEST_FOR_TARGET = `\
+ if [ -f $${srcdir}/../../dejagnu/runtest ]; then \
+ echo $${srcdir}/../../dejagnu/runtest; \
+ else \
+ if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
+ echo runtest; \
+ else \
+ t='$(program_transform_name)'; echo runtest | sed -e $$t; \
+ fi; \
+ fi`
+
+#### host, target, and site specific Makefile frags come in here.
+
+# The use of $$(x_FOR_TARGET) reduces the command line length by not
+# duplicating the lengthy definition.
+
+TARGET_FLAGS_TO_PASS = \
+ "prefix=$(prefix)" \
+ "exec_prefix=$(exec_prefix)" \
+ "against=$(against)" \
+ 'CC=$$(CC_FOR_TARGET)' \
+ "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
+ "CFLAGS=$(TESTSUITE_CFLAGS)" \
+ 'CXX=$$(CXX_FOR_TARGET)' \
+ "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
+ "CXXFLAGS=$(CXXFLAGS)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "LDFLAGS=$(LDFLAGS)" \
+ "LIBS=$(LIBS)" \
+ "RUNTEST=$(RUNTEST)" \
+ "RUNTESTFLAGS=$(RUNTESTFLAGS)"
+
+all:
+ @echo "Nothing to be done for all..."
+
+.NOEXPORT:
+INFODIRS=doc
+info:
+install-info:
+dvi:
+pdf:
+install-pdf:
+html:
+install-html:
+
+install:
+
+uninstall: force
+
+# Use absolute `site.exp' path everywhere to suppress VPATH lookups for it.
+# Bare `site.exp' is used as a target here if user requests it explicitly.
+# $(RUNTEST) is looking up `site.exp' only in the current directory.
+
+$(abs_builddir)/site.exp site.exp: ./config.status Makefile
+ @echo "Making a new config file..."
+ -@rm -f ./tmp?
+ @touch site.exp
+ -@mv site.exp site.bak
+ @echo "## these variables are automatically generated by make ##" > ./tmp0
+ @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
+ @echo "# add them to the last section" >> ./tmp0
+ @echo "set host_triplet ${host_canonical}" >> ./tmp0
+ @echo "set target_alias $(target_alias)" >> ./tmp0
+ @echo "set target_triplet ${target_canonical}" >> ./tmp0
+ @echo "set build_triplet ${build_canonical}" >> ./tmp0
+ @echo "set srcdir ${srcdir}" >> ./tmp0
+ @echo "set tool gdb" >> ./tmp0
+ @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
+ @cat ./tmp0 > site.exp
+ @cat site.bak | sed \
+ -e '1,/^## All variables above are.*##/ d' >> site.exp
+ -@rm -f ./tmp?
+
+installcheck:
+
+# For GNU make, try to run the tests in parallel. If RUNTESTFLAGS is
+# not empty, then by default the tests will be serialized. This can
+# be overridden by setting FORCE_PARALLEL to any non-empty value.
+# For a non-GNU make, do not parallelize.
+@GMAKE_TRUE@CHECK_TARGET = $(if $(FORCE_PARALLEL),check-parallel,$(if $(RUNTESTFLAGS),check-single,check-parallel))
+@GMAKE_FALSE@CHECK_TARGET = check-single
+
+check: $(CHECK_TARGET)
+
+# All the hair to invoke dejagnu. A given invocation can just append
+# $(RUNTESTFLAGS)
+DO_RUNTEST = \
+ rootme=`pwd`; export rootme; \
+ srcdir=${srcdir} ; export srcdir ; \
+ EXPECT=${EXPECT} ; export EXPECT ; \
+ EXEEXT=${EXEEXT} ; export EXEEXT ; \
+ $(RPATH_ENVVAR)=$$rootme/../../expect:$$rootme/../../libstdc++:$$rootme/../../tk/unix:$$rootme/../../tcl/unix:$$rootme/../../bfd:$$rootme/../../opcodes:$$$(RPATH_ENVVAR); \
+ export $(RPATH_ENVVAR); \
+ if [ -f $${rootme}/../../expect/expect ] ; then \
+ TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
+ export TCL_LIBRARY ; fi ; \
+ $(RUNTEST)
+
+check-single: all $(abs_builddir)/site.exp
+ $(DO_RUNTEST) $(RUNTESTFLAGS)
+
+# A list of all directories named "gdb.*" which also hold a .exp file.
+# We filter out gdb.base and add fake entries, because that directory
+# takes the longest to process, and so we split it in half.
+TEST_DIRS = gdb.base1 gdb.base2 $(filter-out gdb.base,$(sort $(notdir $(patsubst %/,%,$(dir $(wildcard $(srcdir)/gdb.*/*.exp))))))
+
+TEST_TARGETS = $(addprefix check-,$(TEST_DIRS))
+
+# We explicitly re-invoke make here for two reasons. First, it lets
+# us add a -k option, which makes the parallel check mimic the
+# behavior of the serial check; and second, it means that we can still
+# regenerate the sum and log files even if a sub-make fails -- which
+# it usually does because dejagnu exits with an error if any test
+# fails.
+check-parallel:
+ $(MAKE) -k $(TEST_TARGETS); \
+ $(SHELL) $(srcdir)/dg-extract-results.sh \
+ $(addsuffix /gdb.sum,$(TEST_DIRS)) > gdb.sum; \
+ $(SHELL) $(srcdir)/dg-extract-results.sh -L \
+ $(addsuffix /gdb.log,$(TEST_DIRS)) > gdb.log
+
+@GMAKE_TRUE@$(filter-out check-gdb.base%,$(TEST_TARGETS)): check-gdb.%: all $(abs_builddir)/site.exp
+@GMAKE_TRUE@ @if test ! -d gdb.$*; then mkdir gdb.$*; fi
+@GMAKE_TRUE@ $(DO_RUNTEST) --directory=gdb.$* --outdir=gdb.$* $(RUNTESTFLAGS)
+
+# Each half (roughly) of the .exp files from gdb.base.
+BASE1_FILES = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/gdb.base/[a-m]*.exp))
+BASE2_FILES = $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/gdb.base/[n-z]*.exp))
+
+# Handle each half of gdb.base.
+check-gdb.base%: all $(abs_builddir)/site.exp
+ @if test ! -d gdb.base$*; then mkdir gdb.base$*; fi
+ $(DO_RUNTEST) $(BASE$*_FILES) --outdir gdb.base$* $(RUNTESTFLAGS)
+
+subdir_do: force
+ @for i in $(DODIRS); do \
+ if [ -d ./$$i ] ; then \
+ if (rootme=`pwd`/ ; export rootme ; \
+ rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
+ cd ./$$i; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
+ else exit 1 ; fi ; \
+ else true ; fi ; \
+ done
+
+force:;
+
+subdirs:
+ for dir in ${ALL_SUBDIRS} ; \
+ do \
+ echo "$$dir:" ; \
+ if [ -d $$dir ] ; then \
+ (rootme=`pwd`/ ; export rootme ; \
+ rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
+ cd $$dir; $(MAKE) $(TARGET_FLAGS_TO_PASS)); \
+ fi; \
+ done
+
+clean mostlyclean:
+ -rm -f *~ core *.o a.out xgdb *.x *.grt
+ if [ x"${ALL_SUBDIRS}" != x ] ; then \
+ for dir in ${ALL_SUBDIRS}; \
+ do \
+ echo "$$dir:"; \
+ if [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) clean); \
+ fi; \
+ done ; \
+ else true; fi
+
+distclean maintainer-clean realclean: clean
+ -rm -f *~ core
+ -rm -f Makefile config.status *-init.exp
+ -rm -fr *.log summary detail *.plog *.sum *.psum site.*
+ if [ x"${ALL_SUBDIRS}" != x ] ; then \
+ for dir in ${ALL_SUBDIRS}; \
+ do \
+ echo "$$dir:"; \
+ if [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) distclean); \
+ fi; \
+ done ; \
+ else true; fi
+
+Makefile : Makefile.in config.status $(host_makefile_frag)
+ $(SHELL) config.status
+
+config.status: configure
+ $(SHELL) config.status --recheck
202 TODO
@@ -0,0 +1,202 @@
+The highest priority item is not on this list: Fix bugs in the
+existing testsuite, fix the GDB/compiler/shell/etc bugs which it
+detects (particularly when they are hard to XFAIL), make it run
+reliably without unexpected failures on the "standard" machines, etc.
+This list exists largely as "tests we can add when we are ready to
+risk destabilizing it again".
+
+There are some tests which are only run on some platforms because they
+have not been tested on more platforms. Enable them and fix any
+problems. A partial list: recurse.exp, watchpoint.exp
+(test_watchpoint_triggered_in_syscall, test_complex_watchpoint).
+
+Test printing of structures passed by value, for the 7th, 8th, and 9th
+arguments (PR 1714). Test printing structure arguments of
+2,4,6,8,12,16,and 20 bytes. Same for structure return of all those
+sizes ("return", "finish", and call function).
+
+Get crossload tests to use --enable-targets and reenable them.
+
+corefile.exp:
+Test ability to run program when there is a core target, then go
+back to the core file when the program exits.
+
+Test handling of floating point variables
+1. float, double, or long double
+2. in register or saved register or memory. Also the case where a
+double is in two float registers and only one of them is saved.
+3. print them or set them
+4. (Alpha) integer (32 or 64 bit) in floating point register.
+
+Print registers--"p $r5", "p sizeof ($r5)". Test that they print
+appropriately (integer registers in decimal, registers which always
+contain addresses (pc, probably sp and fp, maybe others) in hex,
+floating point).
+
+Test completer. Test that it completes a variety of things correctly
+(see the list of test cases in main.c in the gdb source). Test TAB,
+M-?, and the "complete" command.
+
+Test "info line" with all kinds of linespecs. Test that the last line
+of the file works right.
+
+weird.exp--test that unrecognized cross-reference types or
+unrecognized visibility or virtual characters get skipped properly
+(see stabs.texinfo).
+
+Test C++ nested types (especially if PR 1954 is fixed; even if not
+*some* things already should work even in the presence of nested
+types). Test classes nested more than 9 levels deep (g++ mangles
+these differently) (both a demangle test and some tests which also
+test the compiler). Test calling a method of a class nested more than
+9 levels (for gdb_mangle_name and demangling).
+
+Test static member functions (C++). Test that "ptype" shows them
+correctly, both before and after they have been converted from stub
+methods. Test that we can call them.
+
+Test printing complicated types, including functions, pointers to
+arrays of pointers of functions, functions which return pointers to
+functions, etc.
+
+printcmd.exp--test printing enum values. Test printing an enum
+variable whose value is out of range. Test "p (int)enum_var", "p/x
+enum_var". Test that in something like "enum {FOO, LAST_THING=FOO}"
+we print FOO, not LAST_THING.
+
+Test GDB expressions--test all operators (and overloaded operators for
+C++). Test integer constants which are signed or unsigned int, long,
+or long long. Test detection of overflow of an integer constant.
+Here are a few integer constants to test (test they get the right
+types): 5, 5LL, 5LuL, 5L6u (invalid), 5LU. Maybe things like
+0x12345678, 0x87654321, etc., but their types depend on sizes of int,
+long, etc.
+
+Test that printing const-qualified versions of various types works.
+In particular, on the sparc and probably other machines, "double" is
+handled differently from most types because it requires more alignment
+and thus goes in a different section (there is a gcc 2.4.5 bug with
+"const double" on sparc).
+
+Test that GDB's "source" command works and that things work if stdin
+is redirected (to a file or a pipe). Test user defined command. Run
+an inferior each of these ways (to test that inflow.c works). Test
+that GDB works if the last line of stdin or a source'd file lacks a
+newline.
+
+Test that unmatched single quotes produce error messages, both in
+expressions and linespecs.
+
+Test "cd". "foo/bar/.." should get simplified to "foo". "/../.."
+should not get simplified (for Mach). "/.." should not get simplified
+(for other networked OSes; POSIX.1 section B.2.3.7). All these
+examples should continue to work with trailing slashes.
+
+Test scoping; here is a start
+ 1 int i=2;
+ 2 int j=3;
+ 3 main()
+ 4 {
+ 5 int i;
+ 6 for (i=600; i>0; i--)
+ 7 print_line(i);
+ 8 }
+ 9
+10 print_line(i)
+11 int i;
+12 {
+13 h();
+14 printf("%d\n",i);
+15 }
+16
+17 h()
+18 {
+19 printf("In h...");
+20 }
+Set a breakpoint in h, and print i, print_line::i, and main::i. Set a
+breakpoint in main (or don't run the program), and test that
+print_line::i is an error. But if i were static, "p main::i" should
+work even if the program is not being run.
+
+Write a test for the reentracy bug with rs6000_struct_return_address
+in rs6000-tdep.c.
+
+Test "return" from dummy frames. Test "return" from non-innermost
+frame. Test that "return" from a non-innermost frame restores
+registers which are saved not in that frame but in a frame more inner
+(I believe this currently works on few if any architectures).
+
+FORTRAN common blocks (a.out and xcoff--weird.exp has the start of
+one but it is not quite right as of 19 Nov 1993).
+
+Test that "x" command sets $_ and $__. Test $_ in general.
+
+Test that "p/a" works when given addresses in text, data, and bss
+segments. Test that it works if program is compiled with or without
+-g. Test that it works if preceding symbol is static or if it is
+extern.
+
+Given `char abc[] = "abc\0def";' test "x/s abc" followed by "x/s"
+(should display "abc" followed by "def"). Test this works with no
+error message even if this is the last thing in the section (tests
+that val_print_string ignores an error if the error occurs after the
+'\0').
+
+Test ability to process NMAGIC a.out files.
+
+Test shared libraries: "next" over printf, "step" into a function in
+a shared library which has line number info, breakpoint in a function
+in a shared library (either before or after the program is run and the
+shared libraries are loaded--also maybe write a test where the PLT
+will be in an unloaded state even though the shared library is loaded).
+
+If there are two breakpoints in the same place, and exactly one of
+them has its condition true, test that the correct breakpoint gets
+printed.
+
+Test "jump" including jump to a breakpoint (the latter will need an
+xfail for UDI and probably VxWorks (PR 1786 for vxworks; PR 2416
+contains some info for 29k).
+
+Set a watchpoint on a local variable (to be interesting, make a few
+calls, to be more interesting, make a recursive call). Test that it
+gets disabled when leaving that scope.
+
+Test calling a function, hitting a breakpoint in the called function,
+calling another function, and hitting a breakpoint. Test backtrace
+works in the presence of multiple dummy frames. Test that "continue"
+will get you out of the inner called function, and "continue" again
+will get you back to where you were when you called the first one.
+
+Test special longjmp handling in wait_for_inferior (need to figure out
+in detail what the proper behavior in each case is). Test longjmp to
+a place where there is a breakpoint (such that
+BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE happens). In general, test
+interactions between longjmp and watchpoints, breakpoints, stepping,
+call function, etc.
+
+Test jumping right past a breakpoint (the case where wait_for_inferior
+passes not_a_breakpoint to bpstat_stop_status). Might already be
+tested by some of the sun3 tests. Probably want a .s test to avoid
+compiler dependencies.
+
+Test more obscure wait_for_inferior cases, expanding on the tests in
+watchpoint.exp, signals.exp, etc.
+
+Test stepping into functions which are one line long and functions
+which are on line 1 of the source file. (there is a class of bugs in
+which gdb doesn't find the line number information, and thus doesn't
+step into the function).
+
+Test that prologue recognition, backtrace, printing locals, etc.,
+still work in the presence of large frames (the point being that at
+some point immediate fields in RISC instructions will overflow and
+prologues will need to look different. For sparc, the immediate field
+is 13 bits (signed), so I believe the threshold would be 4K bytes in a
+frame).
+
+
+(this is for editing this file with GNU emacs)
+Local Variables:
+mode: text
+End:
35 aclocal.m4
@@ -0,0 +1,35 @@
+sinclude(../../config/acx.m4)
+sinclude(../../config/override.m4)
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
1 config/arm-ice.exp
@@ -0,0 +1 @@
+load_lib "../config/monitor.exp";
17 config/cfdbug.exp
@@ -0,0 +1,17 @@
+# Copyright 1997, 1999, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "../config/monitor.exp"
1 config/cygmon.exp
@@ -0,0 +1 @@
+load_lib "../config/monitor.exp";
16 config/d10v.exp
@@ -0,0 +1,16 @@
+# Copyright (C) 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "../config/monitor.exp"
16 config/default.exp
@@ -0,0 +1,16 @@
+# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib gdb.exp
19 config/dve.exp
@@ -0,0 +1,19 @@
+# Copyright 1998, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
+set timeout 1000
+verbose "Timeout is now $timeout seconds" 2
+
87 config/gdbserver.exp
@@ -0,0 +1,87 @@
+# Copyright 2000, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test framework for GDB (remote protocol) using a "gdbserver",
+# ie. a debug agent running as a native process on the same or
+# a different host.
+
+#
+# This module to be used for testing gdb with a "gdbserver"
+# built either from libremote or from gdb/gdbserver.
+#
+
+#
+# To be addressed or set in your baseboard config file:
+#
+# set_board_info gdb_protocol "remote"
+# Unles you have a gdbserver that uses a different protocol...
+#
+# set_board_info use_gdb_stub 1
+# This tells the rest of the test suite not to do things
+# like "run" which don't work well on remote targets.
+#
+# set_board_info gdb,do_reload_on_run 1
+# Unles you have a gdbserver that can handle multiple sessions.
+#
+# set_board_info noargs 1
+# At present there is no provision in the remote protocol
+# for passing arguments. This test framework does not
+# address the issue, so it's best to set this variable
+# in your baseboard configuration file.
+# FIXME: there's no reason why the test harness couldn't
+# pass commandline args when it spawns gdbserver.
+#
+# set_board_info gdb,noinferiorio 1
+# Neither the traditional gdbserver nor the one in libremote
+# can presently capture stdout and relay it to GDB via the
+# 'O' packet. This means that tests involving printf will
+# fail unles you set this varibale in your baseboard
+# configuration file.
+#
+# set_board_info gdb,no_hardware_watchpoints 1
+# Unles you have a gdbserver that supports hardware watchpoints.
+# FIXME: gdb should detect if the target doesn't support them,
+# and fall back to using software watchpoints.
+#
+# set_board_info gdb_server_prog
+# This will be the path to the gdbserver program you want to test.
+# Defaults to "gdbserver".
+#
+# set_board_info sockethost
+# The name of the host computer whose socket is being used.
+# Defaults to "localhost". Note: old gdbserver requires
+# that you define this, but libremote/gdbserver does not.
+#
+# set_board_info gdb,socketport
+# Port id to use for socket connection. If not set explicitly,
+# it will start at "2345" and increment for each use.
+#
+
+# The guts live in gdbserver-support.exp now.
+
+load_lib gdbserver-support.exp
+
+proc gdbserver_gdb_load { } {
+ return [gdbserver_spawn ""]
+}
+
+proc gdb_reload { } {
+ return [gdbserver_run ""]
+}
+
+proc gdb_reconnect { } {
+ return [gdbserver_reconnect]
+}
1 config/h8300.exp
@@ -0,0 +1 @@
+load_lib "../config/monitor.exp";
1 config/i386-bozo.exp
@@ -0,0 +1 @@
+load_lib "../config/monitor.exp"
16 config/i960.exp
@@ -0,0 +1,16 @@
+# Copyright 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
1 config/m32r-stub.exp
@@ -0,0 +1 @@
+load_lib "../../testsuite/config/sparclet.exp"
19 config/m32r.exp
@@ -0,0 +1,19 @@
+# Copyright 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
+set timeout 120
+verbose "Timeout is now $timeout seconds" 2
+
17 config/mips-idt.exp
@@ -0,0 +1,17 @@
+# Copyright (C) 1993, 1997, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
17 config/mips.exp
@@ -0,0 +1,17 @@
+# Copyright (C) 1993, 1997, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
19 config/mn10300-eval.exp
@@ -0,0 +1,19 @@
+# Copyright 1998, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
+set timeout 1000
+verbose "Timeout is now $timeout seconds" 2
+
259 config/monitor.exp
@@ -0,0 +1,259 @@
+# Test Framework Driver for GDB driving a ROM monitor (via monitor.c).
+# Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib gdb.exp
+# puts "***** DID USE MONITOR ******"
+
+#
+# gdb_target_cmd
+# Send gdb the "target" command
+#
+proc gdb_target_cmd { targetname serialport } {
+ global gdb_prompt
+
+ for {set i 1} {$i <= 3} {incr i} {
+ send_gdb "target $targetname $serialport\n"
+ gdb_expect 60 {
+ -re "A program is being debugged already.*ill it.*y or n. $" {
+ send_gdb "y\n";
+ exp_continue;
+ }
+ -re "Couldn't establish connection to remote.*$gdb_prompt" {
+ verbose "Connection failed";
+ }
+ -re "Remote MIPS debugging.*$gdb_prompt" {
+ verbose "Set target to $targetname";
+ return 0;
+ }
+ -re "Remote debugging using .*$serialport.*$gdb_prompt" {
+ verbose "Set target to $targetname";
+ return 0;
+ }
+ -re "Remote target $targetname connected to.*$gdb_prompt" {
+ verbose "Set target to $targetname";
+ return 0;
+ }
+ -re "Connected to.*$gdb_prompt" {
+ verbose "Set target to $targetname";
+ return 0;
+ }
+ -re "Ending remote.*$gdb_prompt" { }
+ -re "Connection refused.*$gdb_prompt" {
+ verbose "Connection refused by remote target. Pausing, and trying again."
+ sleep 30
+ continue
+ }
+ -re "Timeout reading from remote system.*$gdb_prompt" {
+ verbose "Got timeout error from gdb.";
+ }
+ timeout {
+ send_gdb "";
+ break
+ }
+ }
+ }
+ return 1
+}
+
+
+
+#
+# gdb_target_monitor
+# Set gdb to target the monitor
+#
+proc gdb_target_monitor { exec_file } {
+ global gdb_prompt
+ global exit_status
+ global timeout
+
+ if [target_info exists gdb_protocol] {
+ set targetname "[target_info gdb_protocol]"
+ } else {
+ perror "No protocol specified for [target_info name].";
+ return -1;
+ }
+ if [target_info exists baud] {
+ gdb_test "set remotebaud [target_info baud]" "" ""
+ }
+ if [target_info exists binarydownload] {
+ gdb_test "set remotebinarydownload [target_info binarydownload]" "" ""
+ }
+ if { [ target_info exists disable_x_packet ] } {
+ gdb_test "set remote X-packet disable" ""
+ }
+ if { [ target_info exists disable_z_packet ] } {
+ gdb_test "set remote Z-packet disable" ""
+ }
+ if [target_info exists gdb_serial] {
+ set serialport "[target_info gdb_serial]";
+ } elseif [target_info exists netport] {
+ set serialport "[target_info netport]"
+ } else {
+ set serialport "[target_info serial]"
+ }
+
+ for {set j 1} {$j <= 2} {incr j} {
+ if [gdb_file_cmd $exec_file] { return -1; }
+
+ if ![gdb_target_cmd $targetname $serialport] { return 0; }
+
+ gdb_target_exec;
+
+ if { $j == 1 && ![reboot_target] } {
+ break;
+ }
+ }
+
+ perror "Couldn't set target for $targetname, port is $serialport.";
+ return -1;
+}
+
+proc gdb_target_exec { } {
+ gdb_test "target exec" "No executable file now." "" ".*Kill it.*y or n.*" "y"
+
+}
+#
+# gdb_load -- load a file into the debugger.
+# return a -1 if anything goes wrong.
+#
+proc gdb_load { arg } {
+ global verbose
+ global loadpath
+ global loadfile
+ global GDB
+ global gdb_prompt
+ global timeout
+ global last_gdb_file;
+
+ if { $arg == "" } {
+ if [info exists last_gdb_file] {
+ set arg $last_gdb_file;
+ } else {
+ send_gdb "info files\n";
+ gdb_expect 30 {
+ -re "Symbols from \"(\[^\"\]+)\"" {
+ set arg $expect_out(1,string);
+ exp_continue;
+ }
+ -re "Local exec file:\[\r\n\]+\[ \t\]*`(\[^'\]+)'," {
+ set arg $expect_out(1,string);
+ exp_continue;
+ }
+ -re "$gdb_prompt $" { }
+ }
+ }
+ }
+
+ set last_gdb_file $arg;
+
+ for { set j 1; } { $j <= 2 } {incr j; } {
+ if [target_info exists gdb,use_standard_load] {
+ gdb_target_exec;
+ if ![target_info exists gdb,no_push_conn] {
+ remote_push_conn host;
+ }
+ set state [remote_ld target $arg];
+ if ![target_info exists gdb,no_push_conn] {
+ remote_close target;
+ remote_pop_conn host;
+ }
+ if { $state == "pass" } {
+ if [gdb_target_monitor $arg] { return -1; }
+ gdb_test "list main" ".*" ""
+ verbose "Loaded $arg into $GDB\n";
+ return 0;
+ }
+ } else {
+
+ if [gdb_target_monitor $arg] { return -1 }
+
+ if [is_remote host] {
+ # FIXME: Multiple downloads. bleah.
+ set farg [remote_download host $arg];
+ } else {
+ set farg $arg;
+ }
+
+ if { $arg != "" && [target_info exists gdb_sect_offset] } {
+ set textoff [target_info gdb_sect_offset];
+ send_gdb "sect .text $textoff\n";
+ gdb_expect 30 {
+ -re "(0x\[0-9a-z]+) - 0x\[0-9a-z\]+ is \\.data" {
+ set dataoff $expect_out(1,string);
+ exp_continue;
+ }
+ -re "(0x\[0-9a-z\]+) - 0x\[0-9a-z\]+ is \\.bss" {
+ set bssoff $expect_out(1,string);
+ exp_continue;
+ }
+ -re "$gdb_prompt" { }
+ }
+ set dataoff [format 0x%x [expr $dataoff + $textoff]];
+ set bssoff [format 0x%x [expr $bssoff + $textoff]];
+ send_gdb "sect .data $dataoff\n";
+ gdb_expect 30 {
+ -re "$gdb_prompt" { }
+ }
+ send_gdb "sect .bss $bssoff\n";
+ gdb_expect 30 {
+ -re "$gdb_prompt" { }
+ }
+ }
+
+ verbose "Loading $farg"
+ if [target_info exists gdb_load_offset] {
+ set command "load $farg [target_info gdb_load_offset]\n";
+ } else {
+ set command "load $farg\n";
+ }
+ if [target_info exists gdb_load_timeout] {
+ set loadtimeout [target_info gdb_load_timeout]
+ } else {
+ set loadtimeout 1600
+ }
+
+ send_gdb $command;
+ gdb_expect $loadtimeout {
+ -re "\[Ff\]ailed.*$gdb_prompt $" {
+ verbose "load failed";
+ }
+ -re "Timeout reading from remote.*$gdb_prompt" {
+ }
+ -re "$gdb_prompt $" {
+ verbose "Loaded $farg into $GDB\n"
+ return 0;
+ }
+ timeout {
+ if { $verbose > 1 } {
+ perror "Timed out trying to load $farg."
+ }
+ }
+ }
+ }
+
+ # Make sure we don't have an open connection to the target.
+ gdb_target_exec;
+
+ if { $j == 1 } {
+ if { ![reboot_target] } {
+ break;
+ }
+ }
+ }
+ perror "Couldn't load file into GDB.";
+ return -1;
+}
16 config/proelf.exp
@@ -0,0 +1,16 @@
+# Copyright 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
16 config/rom68k.exp
@@ -0,0 +1,16 @@
+# Copyright 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
16 config/sh.exp
@@ -0,0 +1,16 @@
+# Copyright 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
218 config/sid.exp
@@ -0,0 +1,218 @@
+# Test Framework Driver for GDB driving an external simulator
+# Copyright 1999, 2001, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib gdb.exp
+
+proc sid_start {} {
+ global verbose
+
+ set port [lindex [split [target_info netport] ":"] 1]
+
+ # Set a default endianness
+ case [target_info multilib_flags] in {
+ { *big-endian* *-EB* *-meb* } { set sidendian "-EB" }
+ { *little-endian* *-EL* *-mel* } { set sidendian "-EL" }
+ default {
+ if {[target_info exists sim,defaultendian]} then {
+ set sidendian [target_info sim,defaultendian]
+ } else {
+ # rely on endianness settings in sid configuration defaults
+ set sidendian ""
+ }
+ }
+ }
+ case $sidendian in {
+ { -EB } { set sidendian2 {-e "set cpu endian big"} }
+ { -EL } { set sidendian2 {-e "set cpu endian little"} }
+ default { set sidendian2 {} }
+ }
+
+ # test to see whether to use use sid in build or install tree
+ set use_build_tree [file exists ../../sid]
+
+ if {$use_build_tree} then {
+ set pre_spawn {
+ global env
+ set env(SID_LIBRARY_PATH) [join [glob "../../sid/component/*"] ":"]
+ set env(SID) "../../sid/main/dynamic/sid"
+ if {! [file exists $env(SID)]} then { error "Cannot find sid in build tree" }
+ }
+ if { [board_info target sim,protocol] == "sid" } {
+ set spawncmd "[target_info sim] [target_info sim,options] $sidendian2 -e \"set cpu-gdb-socket sockaddr-local 0.0.0.0:$port\""
+ } elseif { [board_info target sim,protocol] == "rawsid" } {
+ set spawncmd "[target_info sim] [target_info sim,options] -$sidendian --gdb=$port"
+ } else {
+ set spawncmd "../../sid/bsp/[target_info sim] $sidendian --gdb=$port [target_info sim,options]"
+ }
+ set post_spawn {
+ global env
+ unset env(SID_LIBRARY_PATH)
+ unset env(SID)
+ }
+ } else {
+ set pre_spawn {}
+ if { [board_info target sim,protocol] == "sid" } {
+ # FIXME: sim,options may be from the build tree, should find
+ # it in the install tree.
+ set spawncmd "sid [target_info sim,options] $sidendian2 -e \"set cpu-gdb-socket sockaddr-local 0.0.0.0:$port\""
+ } elseif { [board_info target sim,protocol] == "rawsid" } {
+ set spawncmd "[target_info sim] [target_info sim,options] -$sidendian --gdb=$port"
+ } else {
+ set spawncmd "[target_info sim] $sidendian --gdb=$port [target_info sim,options]"
+ }
+ set post_spawn {}
+ }
+
+ eval $pre_spawn
+ if {[catch [list remote_spawn host $spawncmd] msg]} {
+ perror $msg
+ exit 1
+ }
+ eval $post_spawn
+
+ # Don't do the following any more; it breaks with "runtest ... < /dev/null"
+# expect_background {
+# -re \[^\n\]*\n {
+# regsub "\n" $expect_out(buffer) {} msg
+# verbose "SID: $msg" 2
+# }
+# }
+
+ # There should be no need to sleep to give SID time to start;
+ # GDB would wait for a fair while for the stub to respond.
+ sleep 4
+
+ if ![target_info exists gdb,no_push_conn] {
+ remote_push_conn host;
+ }
+}
+
+#
+# Handle GDB talking to SID
+#
+
+proc gdb_start {} {
+ sid_start
+ return [default_gdb_start]
+}
+
+proc sid_exit {} {
+ if ![target_info exists gdb,no_push_conn] {
+ remote_close host;
+ remote_pop_conn host;
+ }
+}
+
+proc gdb_exit {} {
+ set result [default_gdb_exit]
+ sid_exit
+ return $result
+}
+
+#
+# gdb_target_sid
+# Set gdb to target the simulator
+#
+proc send_target_sid { } {
+ # wait a little while, giving sid time to shut down & restart its
+ # gdb socket
+ sleep 4
+ send_gdb "target [target_info gdb_protocol] [target_info netport]\n"
+}
+
+proc gdb_target_sid { } {
+ global gdb_prompt
+ global exit_status
+
+ send_target_sid
+
+ global timeout
+ set prev_timeout $timeout
+ set timeout 60
+ verbose "Timeout is now $timeout seconds" 2
+ gdb_expect {
+ -re ".*\[Ee\]rror.*$gdb_prompt $" {
+ perror "Couldn't set target for remote simulator."
+ cleanup
+ gdb_exit
+ }
+ -re "Remote debugging using.*$gdb_prompt" {
+ verbose "Set target to sid"
+ }
+ timeout {
+ perror "Couldn't set target for remote simulator."
+ cleanup
+ gdb_exit
+ }
+ }
+ set timeout $prev_timeout
+ verbose "Timeout is now $timeout seconds" 2
+}
+
+#
+# gdb_load -- load a file into the debugger.
+# return a -1 if anything goes wrong.
+#
+proc gdb_load { arg } {
+ global verbose
+ global loadpath
+ global loadfile
+ global GDB
+ global gdb_prompt
+ global retval
+
+ if { $arg != "" } {
+ if [gdb_file_cmd $arg] then { return -1 }
+ }
+
+ gdb_target_sid
+
+ send_gdb "load\n"
+ global timeout
+ set prev_timeout $timeout
+ set timeout 2400
+ verbose "Timeout is now $timeout seconds" 2
+ gdb_expect {
+ -re ".*\[Ee\]rror.*$gdb_prompt $" {
+ if $verbose>1 then {
+ perror "Error during download."
+ }
+ set retval -1;
+ }
+ -re ".*$gdb_prompt $" {
+ if $verbose>1 then {
+ send_user "Loaded $arg into $GDB\n"
+ }
+ set retval 0;
+ }
+ -re "$gdb_prompt $" {
+ if $verbose>1 then {
+ perror "GDB couldn't load."
+ }
+ set retval -1;
+ }
+ timeout {
+ if $verbose>1 then {
+ perror "Timed out trying to load $arg."
+ }
+ set retval -1;
+ }
+ }
+ set timeout $prev_timeout
+ verbose "Timeout is now $timeout seconds" 2
+ return $retval;
+}
88 config/sim.exp
@@ -0,0 +1,88 @@
+# Test Framework Driver for GDB driving a builtin simulator
+# Copyright 1994, 1997, 1998, 2004, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib gdb.exp
+
+#
+# gdb_target_sim
+# Set gdb to target the simulator
+#
+proc gdb_target_sim { } {
+ global gdb_prompt
+
+ set target_sim_options "[board_info target gdb,target_sim_options]";
+
+ send_gdb "target sim $target_sim_options\n"
+ set timeout 60
+ verbose "Timeout is now $timeout seconds" 2
+ gdb_expect {
+ -re "Connected to the simulator.*$gdb_prompt $" {
+ verbose "Set target to sim"
+ }
+ timeout {
+ perror "Couldn't set target for simulator."
+ cleanup
+ return -1
+ }
+ }
+ set timeout 10
+ verbose "Timeout is now $timeout seconds" 2
+ return 0
+}
+
+#
+# gdb_load -- load a file into the debugger.
+# return a -1 if anything goes wrong.
+#
+proc gdb_load { arg } {
+ global verbose
+ global loadpath
+ global loadfile
+ global GDB
+ global gdb_prompt
+
+ if { $arg != "" } {
+ if [gdb_file_cmd $arg] then { return -1 }
+ }
+
+ if [gdb_target_sim] then { return -1 }
+
+ send_gdb "load\n"
+ set timeout 2400
+ verbose "Timeout is now $timeout seconds" 2
+ gdb_expect {
+ -re ".*$gdb_prompt $" {
+ if $verbose>1 then {
+ send_user "Loaded $arg into $GDB\n"
+ }
+ set timeout 30
+ verbose "Timeout is now $timeout seconds" 2
+ return 0
+ }
+ -re "$gdb_prompt $" {
+ if $verbose>1 then {
+ perror "GDB couldn't load."
+ }
+ }
+ timeout {
+ if $verbose>1 then {
+ perror "Timed out trying to load $arg."
+ }
+ }
+ }
+ return -1
+}
180 config/slite.exp
@@ -0,0 +1,180 @@
+# Copyright 1993, 1997, 1998, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This file was written by Ian Lance Taylor <ian@cygnus.com>.
+
+# GDB support routines for a board using the MIPS remote debugging
+# protocol. These are actually pretty generic.
+
+# DejaGnu currently assumes that debugging is being done over the main
+# console port. It would probably be more convenient for people using
+# IDT boards to permit the debugging port and the connected port to be
+# different, since an IDT board has two ports. This would require
+# extending some of the tests in a fashion similar to that done for
+# VxWorks, because the test output would appear on the other port,
+# rather than being displayed by gdb.
+
+load_lib remote.exp
+load_lib gdb.exp
+set gdb_prompt "\\(gdb\\)"
+
+#
+# gdb_load -- load a file into the GDB.
+# Returns a 0 if there was an error,
+# 1 if it load successfully.
+#
+proc gdb_load { arg } {
+ global verbose
+ global loadpath
+ global loadfile
+ global gdb_prompt
+ global GDB
+ global expect_out
+
+ set loadfile [file tail $arg]
+ set loadpath [file dirname $arg]
+
+ gdb_file_cmd $arg
+
+ if [target_info exists gdb_protocol] {
+ set protocol [target_info gdb_protocol];
+ } else {
+ set protocol "sparclite"
+ }
+
+ if [target_info exists serial] {
+ set targetname [target_info serial];
+ set command "target $protocol [target_info serial]\n";
+ } else {
+ if ![target_info exists netport] {
+ perror "Need either netport or gdb_serial entry for [target_info name].";
+ return -1;
+ }
+ set targetname [target_info netport];
+ set command "target $protocol udp [target_info netport]\n";
+ }
+ set timeout 60
+ verbose "Timeout is now $timeout seconds" 2
+ set try_count 0;
+ send_gdb $command;
+ gdb_expect {
+ -re "Unknown response.*resetting the board.|remote timeout" {
+ incr try_count;
+ if { $try_count > 3 } {
+ set try_count 0;
+ reboot_target;
+ sleep 5;
+ }
+ sleep 1;
+ send_gdb $command;
+ exp_continue;
+ }
+ -re "Remote target.*$gdb_prompt $" { }
+ -re ".*SPARClite appears to be alive.*$gdb_prompt $" {
+ if $verbose>1 then {
+ send_user "Set target to $targetname\n"
+ }
+ }
+ timeout {
+ perror "Couldn't set SLITE target."
+ set timeout 10
+ verbose "Timeout is now $timeout seconds" 2
+ return -1
+ }
+ }
+
+ if [target_info exists gdb_load_offset] {
+ set offset "[target_info gdb_load_offset]";
+ } else {
+ set offset "";
+ }
+ if { 1 } {
+ if [is_remote host] {
+ set arg [remote_download host $arg];
+ if { $arg == "" } {
+ error "download failed"
+ return -1;
+ }
+ }
+ send_gdb "load $arg $offset\n"
+ verbose "Loading $arg into $GDB" 2
+ set timeout 2400
+ verbose "Timeout is now $timeout seconds" 2
+ gdb_expect {
+ -re "Loading.*$gdb_prompt $" {
+ verbose "Loaded $arg into $GDB" 1
+ set timeout 30
+ verbose "Timeout is now $timeout seconds" 2
+ }
+ -re "$gdb_prompt $" {
+ if $verbose>1 then {
+ perror "GDB couldn't load."
+ }
+ }
+ timeout {
+ if $verbose>1 then {
+ perror "Timed out trying to load $arg."
+ }
+ }
+ }
+ }
+ # Some SPARClite boards automagically do a run after the program is
+ # loaded.
+ if [target_info exists need_monitor_run] {
+ set timeout 10
+ verbose "Timeout is now $timeout seconds, doing monitor run" 2
+ send_gdb "monitor run\n";
+ sleep 2;
+ send_gdb "";
+ gdb_expect {
+ -re ".*$gdb_prompt $" { verbose "Run command succeded" }
+ default {
+ perror "error sending monitor run command";
+ }
+ }
+ } else {
+ sleep 2;
+ }
+
+ if [target_info exists gdb_serial] {
+ set serial [target_info gdb_serial];
+ } else {
+ set serial [target_info serial];
+ }
+ send_gdb "target remote $serial\n"
+ set timeout 60
+ verbose "Timeout is now $timeout seconds" 2
+ gdb_expect {
+ -re ".*Kill it?.*y or n.*" {
+ send_gdb "y\n";
+ exp_continue
+ }
+ -re ".*$gdb_prompt $" {
+ verbose "Set remote target to [target_info serial]" 2
+ }
+ timeout {
+ perror "Couldn't set remote target."
+ set timeout 10
+ verbose "Timeout is now $timeout seconds" 2
+ return -1
+ }
+ }
+
+ if [info exists expect_out(buffer)] then {
+ send_log $expect_out(buffer)
+ }
+ return 0
+}
26 config/unix.exp
@@ -0,0 +1,26 @@
+# Copyright (C) 1988, 1990, 1991, 1992, 1994, 1997, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This file was written by Rob Savoye. (rob@cygnus.com)
+
+# Set a default timeout to be used for the tests under UNIX, rather than
+# accepting whatever default dejagnu gives us (apparently 10 seconds).
+# When running the tests over NFS, under somewhat heavy load, 10 seconds
+# does not seem to be enough. Try starting with 60.
+set timeout 60
+verbose "Timeout is now $timeout seconds" 2
+
+load_lib gdb.exp
16 config/vr4300.exp
@@ -0,0 +1,16 @@
+# Copyright 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
16 config/vr5000.exp
@@ -0,0 +1,16 @@
+# Copyright 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/monitor.exp
127 config/vx.exp
@@ -0,0 +1,127 @@
+# Copyright 1988, 1990, 1991, 1992, 1995, 1997, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This file was written by Rob Savoye. (rob@cygnus.com)
+
+#
+# load support libraries
+#
+load_lib remote.exp
+load_lib gdb.exp
+
+set shell_prompt "->"
+set gdb_prompt "\\(vxgdb\\)"
+
+#
+# gdb_version -- extract and print the version number of gcc
+#
+proc gdb_version {} {
+ default_gdb_version
+}
+
+#
+# gdb_load -- load a file into the debugger.
+# We have to stop and start gdb each time we do this, because when
+# vxgdb loads two files in a row, the symbols in the first file loaded
+# take precedence. Returns -1 on error, else 0.
+#
+proc gdb_load { arg } {
+ set result 0
+
+ if { [remote_ld target $arg] != 0 } {
+ perror "Couldn't load $arg"
+ return -1
+ }
+
+ return [gdb_file_cmd $arg]
+}
+
+#
+# gdb_start -- start gdb running
+#
+proc gdb_start { } {
+ global gdb_prompt
+ global verbose
+ global connectmode
+ global reboot
+
+ # get a connection to the board
+ for { set x 0; } { $x < 3 } { incr x } {
+ set shell_id [remote_open target]
+ if { $shell_id > 0 } {
+ verbose "Spawn id for remote shell is $shell_id"
+
+ set timeout 10
+ verbose "Timeout is now $timeout seconds" 2
+
+ set state [spawn_vxgdb];
+ if { $state == "pass" } {
+ return 0;
+ }
+ if { $state == "fail" } {
+ return -1;
+ }
+ }
+ remote_reboot target;
+ }
+}
+
+proc spawn_vxgdb { } {
+ global gdb_prompt
+
+ default_gdb_start
+
+ # set the default arguments to "main", so that "run" with no
+ # arguments will work correctly.
+ send_gdb "set args main\n"
+ gdb_expect -re ".*$gdb_prompt $" {}
+
+ verbose "Setting up target, Please wait..."
+ # set targets hostname
+ send_gdb "target vxworks [target_info hostname]\n"
+ set timeout 60
+ verbose "Timeout is now $timeout seconds" 2
+ gdb_expect {
+ -re "Done\..*$gdb_prompt $" {
+ verbose "Set target to [target_info hostname]" 1
+ set timeout 10;
+ return "pass";
+ }
+ -re "net_connect: RPC: (Program not registered|.*Timed out).*$" {
+ warning "Couldn't set GDB to target [target_info netport]."
+ }
+ timeout {
+ warning "Couldn't set target for vxworks."
+ }
+ }
+ return "retry";
+}
+
+proc gdb_exit { } {
+ remote_close target;
+ catch default_gdb_exit
+}
+
+#expect_after {
+# "<return>" { send "\n"; perror "Window too small." }
+# -re "\(y or n\) " { send "n\n"; perror "Got interactive prompt." }
+# buffer_full { perror "internal buffer is full." }
+# eof { perror "eof -- pty is hosed." }
+# timeout { perror "timeout." }
+# "virtual memory exhausted" { perror "virtual memory exhausted." }
+# "Undefined command" { perror "send string probably wrong." }
+#}
+
16 config/vxworks.exp
@@ -0,0 +1,16 @@
+# Copyright 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib ../config/vx.exp
24 config/vxworks29k.exp
@@ -0,0 +1,24 @@
+# Copyright 1995, 1997, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This file was written by Brendan Kehoe (brendan@cygnus.com).
+
+# We need this file here because the targetname for the 29k board
+# is `vxworks29k', not `vxworks'. That way other tools (e.g., gcc)
+# can differentiate between the stuff run on that board and others.
+
+verbose "Loading ${srcdir}/config/vx.exp"
+source ${srcdir}/config/vx.exp
4,822 configure
4,822 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
149 configure.ac
@@ -0,0 +1,149 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+# Copyright 2002, 2003, 2004, 2005, 2009, 2010
+# Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AC_PREREQ(2.59)
+AC_INIT(gdb.base)
+
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+
+ACX_NONCANONICAL_TARGET
+
+# Check for the 'make' the user wants to use.
+AC_CHECK_PROGS(MAKE, make)
+MAKE_IS_GNU=
+case "`$MAKE --version 2>&1 | sed 1q`" in
+ *GNU*)
+ MAKE_IS_GNU=yes
+ ;;
+esac
+AM_CONDITIONAL(GMAKE, test "$MAKE_IS_GNU" = yes)
+AC_PROG_MAKE_SET
+
+# Add HP-specific tests when appropriate.
+case $target in
+ hppa*-*-hpux*)
+ AC_CONFIG_SUBDIRS(gdb.hp) ;;
+esac
+
+# Add Cell/B.E. specific tests when appropriate.
+# We need support for both PowerPC and SPU targets configured in.
+case $target in
+ powerpc*-*-linux*)
+ have_spu_target=no
+ for targ in `echo $enable_targets | sed 's/,/ /g'`
+ do
+ case "${targ}" in
+ spu*|all) have_spu_target=yes ;;
+ esac
+ done
+ if test x$have_spu_target = xyes; then
+ AC_CONFIG_SUBDIRS(gdb.cell)
+ fi
+ ;;
+esac
+
+# With stabs.
+AC_ARG_WITH(stabs,
+[ --with-stabs arrange to use stabs instead of host debug format],,
+[# We enable stabs tests by default on selected targets.
+case $target in
+ powerpc-*-aix* \
+ | rs6000-*-aix* \
+ | *-*-*bsd* \
+ | *-*-go32* \
+ | *-*-linux* \
+ | *-*-lynxos* \
+ | *-sun-* \
+ | hppa*-*-* \
+ | *-*-elf* \
+ | *-*-cygwin* \
+ | *-*-mingw* \
+ )
+ with_stabs=yes ;;
+ *)
+ with_stabs=no ;;
+esac])
+
+# Add stabs tests when appropriate.
+if test $with_stabs = yes; then
+ AC_CONFIG_SUBDIRS(gdb.stabs)
+fi
+
+# Enable gdbtk.
+AC_ARG_ENABLE(gdbtk,
+[ --enable-gtk enable gdbtk graphical user interface (GUI)],,
+ [if test -d $srcdir/gdb.gdbtk; then
+ enable_gdbtk=yes
+ else
+ enable_gdbtk=no
+ fi])
+# We unconditionally disable gdbtk tests on selected platforms.
+case $host_os in
+ go32* | windows*)
+ enable_gdbtk=no ;;
+esac
+
+# Add gdbtk tests when appropriate.
+if test $enable_gdbtk = yes; then
+ AC_CONFIG_SUBDIRS(gdb.gdbtk)
+fi
+
+# Enable shared libraries.
+AC_ARG_ENABLE(shared,
+[ --enable-shared build shared libraries [deault=yes]],,
+ enable_shared=yes)
+
+# If we have shared libraries, try to set RPATH_ENVVAR reasonably,
+# such that we can find the shared libraries in the build tree.
+if test $enable_shared = no; then
+ # The variable `RPATH_ENVVAR' itself is not likely to be used on any
+ # platform.
+ RPATH_ENVVAR=RPATH_ENVVAR
+else
+ # The variable `LD_LIBRARY_PATH' is used on most platforms.
+ RPATH_ENVVAR=LD_LIBRARY_PATH
+ # The following exceptions are taken from Libtool 1.4.3.
+ case $host_os in
+ aix*)
+ if test $host_cpu != ia64; then
+ RPATH_ENVVAR=LIBPATH
+ fi ;;
+ darwin* | rhapsody*)
+ RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
+ hpux*)
+ RPATH_ENVVAR=SHLIB_PATH ;;
+ esac
+fi
+AC_SUBST(RPATH_ENVVAR)
+
+AC_CHECK_HEADERS(pthread.h)
+
+AC_EXEEXT