Automatic date update in version.in
[binutils-gdb/blckswan.git] / gdb / testsuite / gdb.asm / asmsrc1.s
blobddf879008426680aad0e9bdb4f799908ee278982
1 .include "common.inc"
2 .include "arch.inc"
4 comment "WARNING: asm-source.exp checks for line numbers printed by gdb."
5 comment "Be careful about changing this file without also changing"
6 comment "asm-source.exp."
9 comment "This file is not linked with crt0."
10 comment "Provide very simplistic equivalent."
12 .global _start
13 gdbasm_declare _start
14 gdbasm_startup
15 gdbasm_call main
16 gdbasm_exit0
17 gdbasm_end _start
19 comment "Displaced stepping requires scratch space at _start"
20 comment "at least as large as the largest instruction. No"
21 comment "breakpoints should be set within the scratch space."
22 gdbasm_several_nops
23 gdbasm_several_nops
24 gdbasm_several_nops
25 gdbasm_several_nops
26 gdbasm_several_nops
27 gdbasm_several_nops
28 gdbasm_several_nops
29 gdbasm_several_nops
31 comment "main routine for assembly source debugging test"
32 comment "This particular testcase uses macros in <arch>.inc to achieve"
33 comment "machine independence."
35 .global main
36 gdbasm_declare main
37 comment "mark: main enter"
38 gdbasm_enter
40 comment "Call a macro that consists of several lines of assembler code."
42 comment "mark: main start"
43 gdbasm_several_nops
45 comment "Call a subroutine in another file."
47 comment "mark: call foo2"
48 gdbasm_call foo2
50 comment "All done."
52 comment "mark: main exit"
53 gdbasm_exit0
54 gdbasm_end main
56 comment "mark: search"
57 comment "A routine for foo2 to call."
59 .global foo3
60 gdbasm_declare foo3
61 gdbasm_enter
62 comment "mark: foo3 start"
63 gdbasm_leave
64 gdbasm_end foo3
66 .global exit
67 gdbasm_declare exit
68 gdbasm_exit0
69 gdbasm_end exit
71 comment "A static function"
73 gdbasm_declare foostatic
74 gdbasm_enter
75 gdbasm_leave
76 gdbasm_end foostatic
78 comment "A global variable"
80 .global globalvar
81 gdbasm_datavar globalvar 11
83 comment "A static variable"
85 gdbasm_datavar staticvar 5
87 .include "note.inc"