1 .include "common.inc" 2 .include "arch.inc" 3 4comment "WARNING: asm-source.exp checks for line numbers printed by gdb." 5comment "Be careful about changing this file without also changing" 6comment "asm-source.exp." 7 8 9comment "This file is not linked with crt0." 10comment "Provide very simplistic equivalent." 11 12 .global _start 13gdbasm_declare _start 14 gdbasm_startup 15 gdbasm_call main 16 gdbasm_exit0 17 gdbasm_end _start 18 19comment "main routine for assembly source debugging test" 20comment "This particular testcase uses macros in <arch>.inc to achieve" 21comment "machine independence." 22 23 .global main 24gdbasm_declare main 25 gdbasm_enter 26 27comment "Call a macro that consists of several lines of assembler code." 28 29 gdbasm_several_nops 30 31comment "Call a subroutine in another file." 32 33 gdbasm_call foo2 34 35comment "All done." 36 37 gdbasm_exit0 38 gdbasm_end main 39 40comment "A routine for foo2 to call." 41 42 .global foo3 43gdbasm_declare foo3 44 gdbasm_enter 45 gdbasm_leave 46 gdbasm_end foo3 47 48 .global exit 49gdbasm_declare exit 50 gdbasm_exit0 51 gdbasm_end exit 52 53comment "A static function" 54 55gdbasm_declare foostatic 56 gdbasm_enter 57 gdbasm_leave 58 gdbasm_end foostatic 59 60comment "A global variable" 61 62 .global globalvar 63gdbasm_datavar globalvar 11 64 65comment "A static variable" 66 67gdbasm_datavar staticvar 5 68 69 .include "note.inc" 70