Implement displaced stepping.
[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
45b074e1 37 gdbasm_enter
c906108c 38
5f2c56f7 39 comment "Call a macro that consists of several lines of assembler code."
c906108c 40
0ce17860 41 comment "mark: main start"
45b074e1 42 gdbasm_several_nops
c906108c 43
5f2c56f7 44 comment "Call a subroutine in another file."
c906108c 45
0ce17860 46 comment "mark: call foo2"
45b074e1 47 gdbasm_call foo2
c906108c 48
5f2c56f7 49 comment "All done."
c906108c 50
0ce17860 51 comment "mark: main exit"
45b074e1 52 gdbasm_exit0
8b1d7e37 53 gdbasm_end main
c906108c 54
0ce17860 55 comment "mark: search"
5f2c56f7 56 comment "A routine for foo2 to call."
c906108c
SS
57
58 .global foo3
5f2c56f7 59 gdbasm_declare foo3
45b074e1 60 gdbasm_enter
0ce17860 61 comment "mark: foo3 start"
45b074e1 62 gdbasm_leave
8b1d7e37 63 gdbasm_end foo3
c906108c
SS
64
65 .global exit
5f2c56f7 66 gdbasm_declare exit
45b074e1 67 gdbasm_exit0
8b1d7e37 68 gdbasm_end exit
ca9efc90 69
5f2c56f7 70 comment "A static function"
ca9efc90 71
5f2c56f7 72 gdbasm_declare foostatic
ca9efc90
MS
73 gdbasm_enter
74 gdbasm_leave
8b1d7e37 75 gdbasm_end foostatic
ca9efc90 76
5f2c56f7 77 comment "A global variable"
ca9efc90
MS
78
79 .global globalvar
5f2c56f7 80 gdbasm_datavar globalvar 11
ca9efc90 81
5f2c56f7 82 comment "A static variable"
ca9efc90 83
5f2c56f7 84 gdbasm_datavar staticvar 5
71507b56
MK
85
86 .include "note.inc"
This page took 0.906046 seconds and 4 git commands to generate.