Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void stack_backtrace()
- {
- dword * ebp;
- int i;
- kprintf("stack backtrace:\n");
- __asm__ __volatile__ ("mov %%ebp, %0" : "=r"(ebp));
- for( ; ebp != 0; ebp = (dword*)(ebp[0]))
- {
- Elf32_Sym * sym;
- kprintf("ebp %08x eip %08x", ebp[0], ebp[1]);
- kprintf("\n");
- // kprintf("\n\targs %08x %08x %08x %08x %08x\n", ebp[2], ebp[3], ebp[4], ebp[5], ebp[6]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment