This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfa] Add gdbasm_ prefix to gdb.asm macro's.
- To: gdb-patches at sources dot redhat dot com
- Subject: [rfa] Add gdbasm_ prefix to gdb.asm macro's.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Fri, 26 Oct 2001 00:22:06 -0400
Hello,
The gdb.asm tests include the assembler macro line:
call foo
unfortunatly some targets have a call instruction. The attached
prefixes everything with ``gdbasm_'' (eg gdbasm_call foo).
Ok?
Andrew
2001-10-26 Andrew Cagney <ac131313@redhat.com>
* gdb.asm/asmsrc1.s: Add ``gdbasm_'' prefix to all macros.
* gdb.asm/asmsrc2.s, gdb.asm/d10v.inc: Update.
Index: gdb.asm/asmsrc1.s
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asmsrc1.s,v
retrieving revision 1.2
diff -p -r1.2 asmsrc1.s
*** asmsrc1.s 2000/07/04 02:47:08 1.2
--- asmsrc1.s 2001/10/26 04:18:11
*************** comment "Provide very simplistic equival
*** 11,19 ****
.global _start
_start:
! startup
! call main
! exit0
comment "main routine for assembly source debugging test"
--- 11,19 ----
.global _start
_start:
! gdbasm_startup
! gdbasm_call main
! gdbasm_exit0
comment "main routine for assembly source debugging test"
*************** comment "machine independence."
*** 22,48 ****
.global main
main:
! enter
comment "Call a macro that consists of several lines of assembler code."
! several_nops
comment "Call a subroutine in another file."
! call foo2
comment "All done."
! exit0
comment "A routine for foo2 to call."
.global foo3
foo3:
! enter
! leave
.global exit
exit:
! exit0
--- 22,48 ----
.global main
main:
! gdbasm_enter
comment "Call a macro that consists of several lines of assembler code."
! gdbasm_several_nops
comment "Call a subroutine in another file."
! gdbasm_call foo2
comment "All done."
! gdbasm_exit0
comment "A routine for foo2 to call."
.global foo3
foo3:
! gdbasm_enter
! gdbasm_leave
.global exit
exit:
! gdbasm_exit0
Index: gdb.asm/asmsrc2.s
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asmsrc2.s,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 asmsrc2.s
*** asmsrc2.s 1999/04/16 01:34:30 1.1.1.1
--- asmsrc2.s 2001/10/26 04:18:11
*************** comment "Second file in assembly source
*** 5,16 ****
.global foo2
foo2:
! enter
comment "Call someplace else."
! call foo3
comment "All done, return."
! leave
--- 5,16 ----
.global foo2
foo2:
! gdbasm_enter
comment "Call someplace else."
! gdbasm_call foo3
comment "All done, return."
! gdbasm_leave
Index: gdb.asm/d10v.inc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/d10v.inc,v
retrieving revision 1.2
diff -p -r1.2 d10v.inc
*** d10v.inc 2000/07/04 02:47:08 1.2
--- d10v.inc 2001/10/26 04:18:11
***************
*** 1,19 ****
comment "subroutine prologue"
! .macro enter
st r13,@-sp
.endm
comment "subroutine epilogue"
! .macro leave
ld r13,@sp+
jmp r13
.endm
! .macro call subr
bl \subr
.endm
! .macro several_nops
nop
nop
nop
--- 1,19 ----
comment "subroutine prologue"
! .macro gdbasm_enter
st r13,@-sp
.endm
comment "subroutine epilogue"
! .macro gdbasm_leave
ld r13,@sp+
jmp r13
.endm
! .macro gdbasm_call subr
bl \subr
.endm
! .macro gdbasm_several_nops
nop
nop
nop
***************
*** 21,32 ****
.endm
comment "exit (0)"
! .macro exit0
ldi r4, 1
ldi r0, 0
trap 15
.endm
comment "crt0 startup"
! .macro startup
.endm
--- 21,32 ----
.endm
comment "exit (0)"
! .macro gdbasm_exit0
ldi r4, 1
ldi r0, 0
trap 15
.endm
comment "crt0 startup"
! .macro gdbasm_startup
.endm