Пример #1
0
static void dump_backtrace_entry(unsigned long where)
{
	/*
	 * Note that 'where' can have a physical address, but it's not handled.
	 */
	print_ip_sym(where);
}
Пример #2
0
static void dump_backtrace_entry(unsigned long where, unsigned long stack)
{
	print_ip_sym(where);
	if (in_exception_text(where))
		dump_mem("", "Exception stack", stack,
			 stack + sizeof(struct pt_regs));
}
Пример #3
0
static void dump_backtrace_entry(unsigned long where, unsigned long stack)
{
	print_ip_sym(where);
	if (in_exception_text(where))
		dump_mem("", "Exception stack", stack,
			 stack + sizeof(struct pt_regs) + 180); /* Additional 180 to workaround sp offset */
}
Пример #4
0
void print_stack_trace(struct stack_trace *trace, int spaces)
{
	int i;

	if (WARN_ON(!trace->entries))
		return;

	for (i = 0; i < trace->nr_entries; i++) {
		printk("%*c", 1 + spaces, ' ');
		print_ip_sym(trace->entries[i]);
	}
}
Пример #5
0
static void __dump(struct task_struct *tsk, unsigned long *base_reg)
{
	unsigned long ret_addr;
	int cnt = LOOP_TIMES, graph = 0;
	pr_emerg("Call Trace:\n");
	if (!IS_ENABLED(CONFIG_FRAME_POINTER)) {
		while (!kstack_end(base_reg)) {
			ret_addr = *base_reg++;
			if (__kernel_text_address(ret_addr)) {
				get_real_ret_addr(&ret_addr, tsk, &graph);
				print_ip_sym(ret_addr);
			}
			if (--cnt < 0)
				break;
		}
	} else {
		while (!kstack_end((void *)base_reg) &&
		       !((unsigned long)base_reg & 0x3) &&
		       ((unsigned long)base_reg >= TASK_SIZE)) {
			unsigned long next_fp;
#if !defined(NDS32_ABI_2)
			ret_addr = base_reg[0];
			next_fp = base_reg[1];
#else
			ret_addr = base_reg[-1];
			next_fp = base_reg[FP_OFFSET];
#endif
			if (__kernel_text_address(ret_addr)) {
				get_real_ret_addr(&ret_addr, tsk, &graph);
				print_ip_sym(ret_addr);
			}
			if (--cnt < 0)
				break;
			base_reg = (unsigned long *)next_fp;
		}
	}
	pr_emerg("\n");
}
Пример #6
0
void show_trace(unsigned long *stack)
{
	unsigned long addr, module_start, module_end;
	extern char _stext[], _etext[];
	int i;

	pr_err("\nCall Trace: ");

	i = 1;
	module_start = VMALLOC_START;
	module_end = VMALLOC_END;

	while (((long)stack & (THREAD_SIZE - 1)) != 0) {
		if (__get_user(addr, stack)) {
			/* This message matches "failing address" marked
			   s390 in ksymoops, so lines containing it will
			   not be filtered out by ksymoops.  */
			pr_err("Failing address 0x%lx\n", (unsigned long)stack);
			break;
		}
		stack++;

		/*
		 * If the address is either in the text segment of the
		 * kernel, or in the region which contains vmalloc'ed
		 * memory, it *may* be the address of a calling
		 * routine; if so, print it so that someone tracing
		 * down the cause of the crash will be able to figure
		 * out the call path that was taken.
		 */
		if (((addr >= (unsigned long)_stext) &&
		     (addr <= (unsigned long)_etext)) ||
		    ((addr >= module_start) && (addr <= module_end))) {
#ifdef CONFIG_KALLSYMS
			print_ip_sym(addr);
#else
			if (i && ((i % 8) == 0))
				pr_err("\n       ");
			pr_err("[<%08lx>] ", addr);
			i++;
#endif
		}
	}
}
Пример #7
0
static void show_trace(struct task_struct *tsk, unsigned long *sp)
{
	unsigned long addr;

	printk(KERN_NOTICE "\n" KERN_NOTICE "Call Trace:\n");

	while (!kstack_end(sp)) {
		addr = *sp++;
		/*
		 * If the address is either in the text segment of the
		 * kernel, or in the region which contains vmalloc'ed
		 * memory, it *may* be the address of a calling
		 * routine; if so, print it so that someone tracing
		 * down the cause of the crash will be able to figure
		 * out the call path that was taken.
		 */
		if (kernel_text_address(addr))
			print_ip_sym(addr);
	}

	printk(KERN_NOTICE "\n");
}
Пример #8
0
static bool print_trace_address(unsigned long pc, void *arg)
{
	print_ip_sym(pc);
	return false;
}