This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Add sparc target to asm-source.exp test



This is a simple-minded implementation of the test for sparc.
It works on solaris, but will probably need tweaking before it will
work on an embedded board (need to reserve memory for stack).

As with the earlier i386 implementation, this one does not bother to
actually call exit (since the test script never gets that far), but
instead arranges to have a SIGSEGV if exit is ever executed (just so
the test will terminate).

The new file "sparc.inc" is included at the end.

2001-11-21  Michael Snyder  <msnyder@redhat.com>

	* gdb.asm/sparc.inc: New file.
	* gdb.asm/asm-source.exp: Recognize sparc target.
	* gdb.asm/configure.in: Recognize sparc target.
	* gdb.asm/configure: Regenerate.
	
Index: configure
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/configure,v
retrieving revision 1.3
diff -c -3 -p -r1.3 configure
*** configure	2001/11/22 01:13:10	1.3
--- configure	2001/11/22 01:26:21
*************** case ${target} in
*** 638,643 ****
--- 638,644 ----
  d10v-*-*) archinc=d10v.inc ;;
  i345686*) archinc=i386.inc ;;
  m32r*-*) archinc=m32r.inc ;;
+ sparc-*-*) archinc=sparc.inc ;;
  esac
  
  
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/configure.in,v
retrieving revision 1.3
diff -c -3 -p -r1.3 configure.in
*** configure.in	2001/11/22 01:13:10	1.3
--- configure.in	2001/11/22 01:26:21
*************** case ${target} in
*** 18,23 ****
--- 18,24 ----
  d10v-*-*) archinc=d10v.inc ;;
  i[3456]86*) archinc=i386.inc ;;
  m32r*-*) archinc=m32r.inc ;;
+ sparc-*-*) archinc=sparc.inc ;;
  esac
  AC_LINK_FILES($archinc,arch.inc)
  
Index: asm-source.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.8
diff -c -3 -p -r1.8 asm-source.exp
*** asm-source.exp	2001/11/22 01:13:10	1.8
--- asm-source.exp	2001/11/22 01:26:21
*************** if [istarget "i\[3456\]86-*-*"] then {
*** 44,49 ****
--- 44,52 ----
  if [istarget "m32r*-*"] then {
      set asm-arch m32r
  }
+ if [istarget "sparc-*-*"] then {
+     set asm-arch sparc
+ }
  if { "${asm-arch}" == "" } {
      gdb_suppress_entire_file "Assembly source test -- not implemented for this target."
  }

	comment "subroutine prologue"
	.macro gdbasm_enter
	save	%sp, -112, %sp
	.endm

	comment "subroutine epilogue"
	.macro gdbasm_leave
	ret
	restore
	.endm

	.macro gdbasm_call subr
	call	\subr
	nop
	.endm

	.macro gdbasm_several_nops
	nop
	nop
	nop
	nop
	.endm

	comment "exit (0)"
	.macro gdbasm_exit0
	comment "Don't know how to exit, but this will certainly halt..."
	ld	[%g0], %i0
	.endm

	comment "crt0 startup"
	.macro gdbasm_startup
	clr	%fp
	.endm


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]