asmsrc1.s revision 1.5
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 comment "mark: main enter" 38 gdbasm_enter 39 40 comment "Call a macro that consists of several lines of assembler code." 41 42 comment "mark: main start" 43 gdbasm_several_nops 44 45 comment "Call a subroutine in another file." 46 47 comment "mark: call foo2" 48 gdbasm_call foo2 49 50 comment "All done." 51 52 comment "mark: main exit" 53 gdbasm_exit0 54 gdbasm_end main 55 56 comment "mark: search" 57 comment "A routine for foo2 to call." 58 59 .global foo3 60 gdbasm_declare foo3 61 gdbasm_enter 62 comment "mark: foo3 start" 63 gdbasm_leave 64 gdbasm_end foo3 65 66 .global exit 67 gdbasm_declare exit 68 gdbasm_exit0 69 gdbasm_end exit 70 71 comment "A static function" 72 73 gdbasm_declare foostatic 74 gdbasm_enter 75 gdbasm_leave 76 gdbasm_end foostatic 77 78 comment "A global variable" 79 80 .global globalvar 81 gdbasm_datavar globalvar 11 82 83 comment "A static variable" 84 85 gdbasm_datavar staticvar 5 86 87 .include "note.inc" 88