[PATCH] Add support for Analog Devices Blackfin processor (part 3/6: gdb testsuite)

Jie Zhang
2005-12-27T15:38:03Z

[-- Attachment #1: Type: text/plain, Size: 134 bytes --]

This is the third part for Analog Devices Blackfin processor, which adds
bfin support in asm-source.exp.

Any comments?

Thanks,
Jie

[-- Attachment #2: bfin-gdb-testsuite.diff --]
[-- Type: text/x-patch, Size: 1539 bytes --]

gdb/

* testsuite/gdb.asm/asm-source.exp: Add support for bfin-*-*.
* testsuite/gdb.asm/bfin.inc: New file.

diff -r -N -u -x CVS src.orig/gdb/testsuite/gdb.asm/asm-source.exp src/gdb/testsuite/gdb.asm/asm-source.exp
--- src.orig/gdb/testsuite/gdb.asm/asm-source.exp 2005-12-09 19:05:26.000000000 +0800
+++ src/gdb/testsuite/gdb.asm/asm-source.exp 2005-12-27 16:55:44.000000000 +0800
@@ -51,6 +51,11 @@
"xscale-*-*" {
set asm-arch arm
}
+ "bfin-*-*" {
+ set asm-arch bfin
+ set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir}"
+ set debug-flags "-g"
+ }
"d10v-*-*" {
set asm-arch d10v
}
diff -r -N -u -x CVS src.orig/gdb/testsuite/gdb.asm/bfin.inc src/gdb/testsuite/gdb.asm/bfin.inc
--- src.orig/gdb/testsuite/gdb.asm/bfin.inc 1970-01-01 08:00:00.000000000 +0800
+++ src/gdb/testsuite/gdb.asm/bfin.inc 2005-12-27 16:56:38.000000000 +0800
@@ -0,0 +1,44 @@
+ comment "subroutine prologue"
+ .macro gdbasm_enter
+ LINK 12;
+ .endm
+
+ comment "subroutine epilogue"
+ .macro gdbasm_leave
+ UNLINK;
+ RTS;
+ .endm
+
+ .macro gdbasm_call subr
+ call \subr;
+ .endm
+
+ .macro gdbasm_several_nops
+ mnop;
+ mnop;
+ mnop;
+ mnop;
+ .endm
+
+ comment "exit (0)"
+ .macro gdbasm_exit0
+ R0 = 0;
+ RAISE 0;
+ .endm
+
+ comment "crt0 startup"
+ .macro gdbasm_startup
+ FP = 0;
+ .endm
+
+ comment "Declare a data variable"
+ .purgem gdbasm_datavar
+ .macro gdbasm_datavar name value
+ .data
+ .align 4
+ .type \name, @object
+ .size \name, 4
+\name:
+ .long \value
+ .endm
+