From: Ben Pfaff Date: Thu, 20 Jan 2005 07:35:50 +0000 (+0000) Subject: Improve debuggability by adding .func/.endfunc around functions. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3836cfc77ccaace693f83be1ed5a290bce26e564;p=pintos-anon Improve debuggability by adding .func/.endfunc around functions. --- diff --git a/grading/userprog/null.S b/grading/userprog/null.S index e4f7e3a..ded0e59 100644 --- a/grading/userprog/null.S +++ b/grading/userprog/null.S @@ -1,3 +1,5 @@ - .globl _start +.globl _start +.func _start _start: int $0x30 +.endfunc diff --git a/src/threads/start.S b/src/threads/start.S index df63f85..5a495c4 100644 --- a/src/threads/start.S +++ b/src/threads/start.S @@ -4,10 +4,13 @@ #### so that this module appears at the very beginning of the kernel #### image, and then using that as the entry point. -.globl start .section .start - + +.globl start +.func start + # Call main. start: call main - # If main returns, spin. + # main() should not return, but if it does, spin. 1: jmp 1b +.endfunc diff --git a/src/threads/switch.S b/src/threads/switch.S index 4f0d412..f58c4a8 100644 --- a/src/threads/switch.S +++ b/src/threads/switch.S @@ -12,9 +12,10 @@ #### restore the registers. As part of switching stacks we record the #### current stack pointer in CUR's thread structure. - .intel_syntax noprefix +.intel_syntax noprefix -.globl switch_threads +.globl switch_threads +.func switch_threads switch_threads: # Save caller's register state. # @@ -49,8 +50,10 @@ switch_threads: pop ebp pop ebx ret +.endfunc .globl switch_entry +.func switch_entry switch_entry: # Discard switch_threads() arguments. add esp, 8 @@ -63,3 +66,4 @@ switch_entry: # Start thread proper. ret +.endfunc