当前位置: 首页>>代码示例>>C++>>正文


C++ show_regs函数代码示例

本文整理汇总了C++中show_regs函数的典型用法代码示例。如果您正苦于以下问题:C++ show_regs函数的具体用法?C++ show_regs怎么用?C++ show_regs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了show_regs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: do_reserved

asmlinkage void do_reserved(struct pt_regs *regs)
{
	/*
	 * Game over - no way to handle this if it ever occurs.  Most probably
	 * caused by a new unknown cpu type or after another deadly
	 * hard/software error.
	 */
	die_if_kernel("do_reserved execution Exception", regs);
	show_regs(regs);
	panic("Caught reserved exception - should not happen.");
}
开发者ID:1703011,项目名称:asuswrt-merlin,代码行数:11,代码来源:traps.c

示例2: do_page_fault

dotraplinkage void do_page_fault(struct pt_regs *regs, long error_code)
{
	unsigned long address = read_cr2();

	__do_page_fault(regs, error_code, address);

	printk("BUG: unable to handle kernel paging request at %#lx\n", address);
	printk("CPU: %d PID: %u Comm: %s\n", smp_processor_id(), current->pid, current->comm);
	show_regs(regs);
	panic("panic at #PF");
}
开发者ID:lastweek,项目名称:Sandix,代码行数:11,代码来源:fault.c

示例3: double_fault_c

asmlinkage void double_fault_c(struct pt_regs *fp)
{
    console_verbose();
    oops_in_progress = 1;
    printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n");
    dump_bfin_process(fp);
    dump_bfin_mem(fp);
    show_regs(fp);
    panic("Double Fault - unrecoverable event\n");

}
开发者ID:liuyang201666,项目名称:linux-akae,代码行数:11,代码来源:traps.c

示例4: sysrq_handle_showallcpus

static void sysrq_handle_showallcpus(int key)
{
	if (!trigger_all_cpu_backtrace()) {
		struct pt_regs *regs = get_irq_regs();

		if (regs) {
			printk(KERN_INFO "CPU%d:\n", smp_processor_id());
			show_regs(regs);
		}
		schedule_work(&sysrq_showallcpus);
	}
}
开发者ID:ivanmeler,项目名称:android_kernel_htc_g3u,代码行数:12,代码来源:sysrq.c

示例5: die

void die(const char *str, struct pt_regs *fp, long err)
{
	console_verbose();
	spin_lock_irq(&die_lock);
	printk(KERN_WARNING "Oops: %s, sig: %ld\n", str, err);
	show_regs(fp);
	spin_unlock_irq(&die_lock);
	/* do_exit() should take care of panic'ing from an interrupt
	 * context so we don't handle it here
	 */
	do_exit(err);
}
开发者ID:ANFS,项目名称:ANFS-kernel,代码行数:12,代码来源:exceptions.c

示例6: c_sys_nis_syscall

/* we come to here via sys_nis_syscall so it can setup the regs argument */
asmlinkage unsigned long
c_sys_nis_syscall (struct pt_regs *regs)
{
	static int count = 0;
	
	if (count++ > 5) return -ENOSYS;
	printk ("%s[%d]: Unimplemented SPARC system call %d\n", current->comm, current->pid, (int)regs->u_regs[1]);
#ifdef DEBUG_UNIMP_SYSCALL	
	show_regs (regs);
#endif
	return -ENOSYS;
}
开发者ID:romanalexander,项目名称:Trickles,代码行数:13,代码来源:sys_sparc.c

示例7: show_kernel_fault_diag

void show_kernel_fault_diag(const char *str, struct pt_regs *regs,
			    unsigned long address)
{
	current->thread.fault_address = address;

	/* Caller and Callee regs */
	show_regs(regs);

	/* Show stack trace if this Fatality happened in kernel mode */
	if (!user_mode(regs))
		show_stacktrace(current, regs);
}
开发者ID:AlexanderStein,项目名称:linux,代码行数:12,代码来源:troubleshoot.c

示例8: do_bedbug_rdump

/* ======================================================================
 * Interpreter command to dump the registers.  Calls the CPU-specific
 * show registers routine.
 * ====================================================================== */
int do_bedbug_rdump (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
	/* -------------------------------------------------- */

	if (!bug_ctx.stopped) {
		printf ("Not at a breakpoint\n");
		return 1;
	}

	show_regs (bug_ctx.regs);
	return 0;
}				/* do_bedbug_rdump */
开发者ID:AceecaNZ,项目名称:MEZ1500Rev2dLinuxUboot,代码行数:16,代码来源:cmd_bedbug.c

示例9: ip32_be_handler

static int ip32_be_handler(struct pt_regs *regs, int is_fixup)
{
	int data = regs->cp0_cause & 4;

	if (is_fixup)
		return MIPS_BE_FIXUP;

	printk("Got %cbe at 0x%lx\n", data ? 'd' : 'i', regs->cp0_epc);
	show_regs(regs);
	dump_tlb_all();
	while(1);
	force_sig(SIGBUS, current);
}
开发者ID:0-T-0,项目名称:ps4-linux,代码行数:13,代码来源:ip32-berr.c

示例10: die_if_kernel

void die_if_kernel(char *str, struct pt_regs *regs, long err)
{
	if (user_mode(regs)) {
#ifdef PRINT_USER_FAULTS
		if (err == 0)
			return; /* STFU */

		/* XXX for debugging only */
		printk(KERN_DEBUG "%s (pid %d): %s (code %ld)\n",
			current->comm, current->pid, str, err);
		show_regs(regs);
#endif
		return;
	}
	
	/* unlock the pdc lock if necessary */
	pdc_emergency_unlock();

	/* maybe the kernel hasn't booted very far yet and hasn't been able 
	 * to initialize the serial or STI console. In that case we should 
	 * re-enable the pdc console, so that the user will be able to 
	 * identify the problem. */
	if (!console_drivers)
		pdc_console_restart();
	
	printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n",
		current->comm, current->pid, str, err);
	show_regs(regs);

	/* Wot's wrong wif bein' racy? */
	if (current->thread.flags & PARISC_KERNEL_DEATH) {
		printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__);
		sti();
		while (1);
	}

	current->thread.flags |= PARISC_KERNEL_DEATH;
	do_exit(SIGSEGV);
}
开发者ID:Picture-Elements,项目名称:linux-2.4-peijse,代码行数:39,代码来源:traps.c

示例11: handle_watch_interrupt

int handle_watch_interrupt(struct pt_regs *regs, int fault)
{
	/* Rewrite status register to clear set bits. */
	unsigned long status = pmc_get_overflow();
	pmc_ack_overflow(status);

	printk("Hit watchpoint somewhat before the following:\n");
	show_regs(regs);

	__insn_mtspr(SPR_PERF_COUNT_0, -1);

	return 0;
}
开发者ID:tcreech,项目名称:tilegx-linux-3.4.68-politestackrehome,代码行数:13,代码来源:watchpoint.c

示例12: watchdog_overflow_callback

/* Callback function for perf event subsystem */
static void watchdog_overflow_callback(struct perf_event *event,
		 struct perf_sample_data *data,
		 struct pt_regs *regs)
{
	/* Ensure the watchdog never gets throttled */
	event->hw.interrupts = 0;

	if (__this_cpu_read(watchdog_nmi_touch) == true) {
		__this_cpu_write(watchdog_nmi_touch, false);
		return;
	}

	/* check for a hardlockup
	 * This is done by making sure our timer interrupt
	 * is incrementing.  The timer interrupt should have
	 * fired multiple times before we overflow'd.  If it hasn't
	 * then this is a good indication the cpu is stuck
	 */
	if (is_hardlockup()) {
		int this_cpu = smp_processor_id();

		/* only print hardlockups once */
		if (__this_cpu_read(hard_watchdog_warn) == true)
			return;

		pr_emerg("Watchdog detected hard LOCKUP on cpu %d", this_cpu);
		print_modules();
		print_irqtrace_events(current);
		if (regs)
			show_regs(regs);
		else
			dump_stack();

		/*
		 * Perform all-CPU dump only once to avoid multiple hardlockups
		 * generating interleaving traces
		 */
		if (sysctl_hardlockup_all_cpu_backtrace &&
				!test_and_set_bit(0, &hardlockup_allcpu_dumped))
			trigger_allbutself_cpu_backtrace();

		if (hardlockup_panic)
			nmi_panic(regs, "Hard LOCKUP");

		__this_cpu_write(hard_watchdog_warn, true);
		return;
	}

	__this_cpu_write(hard_watchdog_warn, false);
	return;
}
开发者ID:forgivemyheart,项目名称:linux,代码行数:52,代码来源:watchdog_hld.c

示例13: handle_break

void handle_break(unsigned iir, struct pt_regs *regs)
{
	struct siginfo si;

	switch(iir) {
	case 0x00:
#ifdef PRINT_USER_FAULTS
		printk(KERN_DEBUG "break 0,0: pid=%d command='%s'\n",
		       current->pid, current->comm);
#endif
		die_if_kernel("Breakpoint", regs, 0);
#ifdef PRINT_USER_FAULTS
		show_regs(regs);
#endif
		si.si_code = TRAP_BRKPT;
		si.si_addr = (void *) (regs->iaoq[0] & ~3);
		si.si_signo = SIGTRAP;
		force_sig_info(SIGTRAP, &si, current);
		break;

	case GDB_BREAK_INSN:
		die_if_kernel("Breakpoint", regs, 0);
		handle_gdb_break(regs, TRAP_BRKPT);
		break;

	default:
#ifdef PRINT_USER_FAULTS
		printk(KERN_DEBUG "break %#08x: pid=%d command='%s'\n",
		       iir, current->pid, current->comm);
		show_regs(regs);
#endif
		si.si_signo = SIGTRAP;
		si.si_code = TRAP_BRKPT;
		si.si_addr = (void *) (regs->iaoq[0] & ~3);
		force_sig_info(SIGTRAP, &si, current);
		return;
	}
}
开发者ID:Picture-Elements,项目名称:linux-2.4-peijse,代码行数:38,代码来源:traps.c

示例14: _exception

void
_exception(int signr, struct pt_regs *regs)
{
	if (!user_mode(regs))
	{
		show_regs(regs);
#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
		debugger(regs);
#endif
		print_backtrace((unsigned long *)regs->gpr[1]);
		panic("Exception in kernel pc %lx signal %d",regs->nip,signr);
	}
	force_sig(signr, current);
}
开发者ID:dmgerman,项目名称:linux-pre-history,代码行数:14,代码来源:traps.c

示例15: sunos_nosys

asmlinkage int sunos_nosys(void)
{
	struct pt_regs *regs;

	regs = (struct pt_regs *) (current->saved_kernel_stack +
				   sizeof(struct reg_window));
	current->tss.sig_address = regs->pc;
	current->tss.sig_desc = regs->u_regs[UREG_G1];
	send_sig(SIGSYS, current, 1);
	printk("Process makes ni_syscall number %d, register dump:\n",
	       (int) regs->u_regs[UREG_G1]);
	show_regs(regs);
	return -ENOSYS;
}
开发者ID:andreiw,项目名称:mkunity,代码行数:14,代码来源:sys_sunos.c


注:本文中的show_regs函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。