Kernel: Move dump_backtrace() out of arch.
I discovered __builtin_frame_address()
This commit is contained in:
		
							parent
							
								
									fbfb3d6b70
								
							
						
					
					
						commit
						6ec4ba3dc9
					
				|  | @ -36,6 +36,7 @@ kernel/font.o			\ | |||
| kernel/Input.o			\ | ||||
| kernel/kernel.o			\ | ||||
| kernel/kmalloc.o		\ | ||||
| kernel/Panic.o			\ | ||||
| kernel/PIC.o			\ | ||||
| kernel/PIT.o			\ | ||||
| kernel/RTC.o			\ | ||||
|  |  | |||
|  | @ -9,6 +9,5 @@ $(ARCHDIR)/boot.o		\ | |||
| $(ARCHDIR)/CPUID.o		\ | ||||
| $(ARCHDIR)/IDT.o		\ | ||||
| $(ARCHDIR)/MMU.o		\ | ||||
| $(ARCHDIR)/Panic.o		\ | ||||
| $(ARCHDIR)/VESA.o		\ | ||||
|   | ||||
|  | @ -8,11 +8,10 @@ namespace Kernel | |||
| 		struct stackframe | ||||
| 		{ | ||||
| 			stackframe* ebp; | ||||
| 			uint32_t eip; | ||||
| 			uint64_t eip; | ||||
| 		}; | ||||
| 
 | ||||
| 		stackframe* frame; | ||||
| 		asm volatile("movl %%ebp, %0" : "=r"(frame)); | ||||
| 		stackframe* frame = (stackframe*)__builtin_frame_address(0); | ||||
| 		BAN::Formatter::print(Serial::serial_putc, "\e[36mStack trace:\r\n"); | ||||
| 		while (frame) | ||||
| 		{ | ||||
		Loading…
	
		Reference in New Issue