1999-04-16 01:35:26 +00:00
|
|
|
.include "common.inc"
|
|
|
|
.include "arch.inc"
|
|
|
|
|
2000-07-04 02:47:08 +00:00
|
|
|
comment "WARNING: asm-source.exp checks for line numbers printed by gdb."
|
|
|
|
comment "Be careful about changing this file without also changing"
|
|
|
|
comment "asm-source.exp."
|
|
|
|
|
|
|
|
|
|
|
|
comment "This file is not linked with crt0."
|
|
|
|
comment "Provide very simplistic equivalent."
|
|
|
|
|
|
|
|
.global _start
|
|
|
|
_start:
|
2001-11-10 17:55:48 +00:00
|
|
|
gdbasm_startup
|
|
|
|
gdbasm_call main
|
|
|
|
gdbasm_exit0
|
2000-07-04 02:47:08 +00:00
|
|
|
|
|
|
|
|
1999-04-16 01:35:26 +00:00
|
|
|
comment "main routine for assembly source debugging test"
|
|
|
|
comment "This particular testcase uses macros in <arch>.inc to achieve"
|
2000-07-04 02:47:08 +00:00
|
|
|
comment "machine independence."
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
.global main
|
|
|
|
main:
|
2001-11-10 17:55:48 +00:00
|
|
|
gdbasm_enter
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
comment "Call a macro that consists of several lines of assembler code."
|
|
|
|
|
2001-11-10 17:55:48 +00:00
|
|
|
gdbasm_several_nops
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
comment "Call a subroutine in another file."
|
|
|
|
|
2001-11-10 17:55:48 +00:00
|
|
|
gdbasm_call foo2
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
comment "All done."
|
|
|
|
|
2001-11-10 17:55:48 +00:00
|
|
|
gdbasm_exit0
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
comment "A routine for foo2 to call."
|
|
|
|
|
|
|
|
.global foo3
|
|
|
|
foo3:
|
2001-11-10 17:55:48 +00:00
|
|
|
gdbasm_enter
|
|
|
|
gdbasm_leave
|
1999-04-16 01:35:26 +00:00
|
|
|
|
|
|
|
.global exit
|
|
|
|
exit:
|
2001-11-10 17:55:48 +00:00
|
|
|
gdbasm_exit0
|
2001-12-04 19:45:57 +00:00
|
|
|
|
|
|
|
comment "A static function"
|
|
|
|
|
|
|
|
foostatic:
|
|
|
|
gdbasm_enter
|
|
|
|
gdbasm_leave
|
|
|
|
|
|
|
|
comment "A global variable"
|
|
|
|
|
|
|
|
.global globalvar
|
|
|
|
gdbasm_datavar globalvar 11
|
|
|
|
|
|
|
|
comment "A static variable"
|
|
|
|
|
|
|
|
gdbasm_datavar staticvar 5
|