Introduce the "with" command
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.asm / asmsrc1.s
CommitLineData
c906108c
SS
1 .include "common.inc"
2 .include "arch.inc"
3
5f2c56f7
RC
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."
78492fde
AC
7
8
5f2c56f7
RC
9 comment "This file is not linked with crt0."
10 comment "Provide very simplistic equivalent."
78492fde
AC
11
12 .global _start
5f2c56f7 13 gdbasm_declare _start
45b074e1
AC
14 gdbasm_startup
15 gdbasm_call main
16 gdbasm_exit0
8b1d7e37 17 gdbasm_end _start
78492fde 18
237fc4c9
PA
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
30
5f2c56f7
RC
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."
c906108c
SS
34
35 .global main
5f2c56f7 36 gdbasm_declare main
218a5a11 37 comment "mark: main enter"
45b074e1 38 gdbasm_enter
c906108c 39
5f2c56f7 40 comment "Call a macro that consists of several lines of assembler code."
c906108c 41
0ce17860 42 comment "mark: main start"
45b074e1 43 gdbasm_several_nops
c906108c 44
5f2c56f7 45 comment "Call a subroutine in another file."
c906108c 46
0ce17860 47 comment "mark: call foo2"
45b074e1 48 gdbasm_call foo2
c906108c 49
5f2c56f7 50 comment "All done."
c906108c 51
0ce17860 52 comment "mark: main exit"
45b074e1 53 gdbasm_exit0
8b1d7e37 54 gdbasm_end main
c906108c 55
0ce17860 56 comment "mark: search"
5f2c56f7 57 comment "A routine for foo2 to call."
c906108c
SS
58
59 .global foo3
5f2c56f7 60 gdbasm_declare foo3
45b074e1 61 gdbasm_enter
0ce17860 62 comment "mark: foo3 start"
45b074e1 63 gdbasm_leave
8b1d7e37 64 gdbasm_end foo3
c906108c
SS
65
66 .global exit
5f2c56f7 67 gdbasm_declare exit
45b074e1 68 gdbasm_exit0
8b1d7e37 69 gdbasm_end exit
ca9efc90 70
5f2c56f7 71 comment "A static function"
ca9efc90 72
5f2c56f7 73 gdbasm_declare foostatic
ca9efc90
MS
74 gdbasm_enter
75 gdbasm_leave
8b1d7e37 76 gdbasm_end foostatic
ca9efc90 77
5f2c56f7 78 comment "A global variable"
ca9efc90
MS
79
80 .global globalvar
5f2c56f7 81 gdbasm_datavar globalvar 11
ca9efc90 82
5f2c56f7 83 comment "A static variable"
ca9efc90 84
5f2c56f7 85 gdbasm_datavar staticvar 5
71507b56
MK
86
87 .include "note.inc"
This page took 1.974292 seconds and 4 git commands to generate.