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