• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ show_registers函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: do_page_fault

void
do_page_fault(struct pt_regs *regs, unsigned int vector)
{
	/* Kernel space exception fixup check */
	if (fixup_exception(regs))
		return;

	unsigned long cr2 = read_cr2();

#ifdef CONFIG_KGDB
	kgdb_breakpoint();
#endif

	struct siginfo s;
	memset(&s, 0, sizeof(struct siginfo));
	s.si_signo = SIGSEGV;
	s.si_errno = 0;
	s.si_addr  = (void *)cr2;
	s.si_code  = SEGV_ACCERR; // SEGV_MAPERR;

	int i = sigsend(current->aspace->id, ANY_ID, SIGSEGV, &s);
	printk(">> PAGE FAULT! Sent signal %d. CR2 is %p, cpu %d\n", i, (void *)cr2, this_cpu);
	show_registers(regs);

	/* If the fault occurred in kernel space, or the init_task, go down */
	if ( (regs->rip >= PAGE_OFFSET) ||
	     (current->aspace->id == INIT_ASPACE_ID)) 
	{
		local_irq_disable();
		halt();
	}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:32,代码来源:interrupts.c


示例2: show

static int show(t_hydra_console *con, t_tokenline_parsed *p)
{
	mode_config_proto_t* proto = &con->mode->proto;
	int tokens_used;

	tokens_used = 0;
	if (p->tokens[1] == T_REGISTERS) {
		tokens_used++;
		show_registers(con);
	} else {

		switch(proto->dev_function) {
		case NFC_TYPEA:
			cprintf(con, "Protocol: TypeA (ISO14443A => MIFARE...)\r\n");
			break;
		case NFC_VICINITY:
			cprintf(con, "Protocol: Vicinity (ISO/IEC 15693)\r\n");
			break;
		default:
			cprintf(con, "Protocol: Unknown\r\n");
			break;
		}
	}

	return tokens_used;
}
开发者ID:jokingmeow,项目名称:hydrafw,代码行数:26,代码来源:hydranfc.c


示例3: show_regs

void show_regs(struct pt_regs *regs)
{
	extern void show_registers(struct pt_regs *regs);

	/* __PHX__ cleanup this mess */
	show_registers(regs);
}
开发者ID:8563,项目名称:millennium-sources,代码行数:7,代码来源:process.c


示例4: do_segment_not_present

void
do_segment_not_present(struct pt_regs *regs, unsigned int vector)
{
	printk("Segment Not Present Exception\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例5: do_spurious_interrupt_bug

void
do_spurious_interrupt_bug(struct pt_regs *regs, unsigned int vector)
{
	printk("Spurious Interrupt Exception\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例6: do_alignment_check

void
do_alignment_check(struct pt_regs *regs, unsigned int vector)
{
	printk("Alignment Check Exception\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例7: do_machine_check

void
do_machine_check(struct pt_regs *regs, unsigned int vector)
{
	printk("Machine Check Exception\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例8: do_general_protection

void
do_general_protection(struct pt_regs *regs, unsigned int vector)
{
	printk("General Protection Exception, cpu %d\n", this_cpu);
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例9: do_coprocessor_error

void
do_coprocessor_error(struct pt_regs *regs, unsigned int vector)
{
	printk("Coprocessor Error Exception\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例10: show_regs

void show_regs(struct pt_regs *regs)
{
	extern void show_registers(struct pt_regs *regs);

	
	show_registers(regs);
}
开发者ID:Blackburn29,项目名称:PsycoKernel,代码行数:7,代码来源:process.c


示例11: do_coproc_segment_overrun

void
do_coproc_segment_overrun(struct pt_regs *regs, unsigned int vector)
{
	printk("Coprocessor Segment Exception\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例12: die_if_kernel

/* This is normally the Oops function. */
void die_if_kernel(const char *str, struct pt_regs *regs, long err)
{
	if (user_mode(regs))
		return;

#ifdef CONFIG_ETRAX_WATCHDOG_NICE_DOGGY
	/*
	 * This printout might take too long and could trigger
	 * the watchdog normally. If NICE_DOGGY is set, simply
	 * stop the watchdog during the printout.
	 */
	stop_watchdog();
#endif

	oops_enter();
	handle_BUG(regs);

	pr_err("Linux %s %s\n", utsname()->release, utsname()->version);
	pr_err("%s: %04lx\n", str, err & 0xffff);

	show_registers(regs);

	oops_exit();
	oops_in_progress = 0;
	pr_err("\n"); /* Flush mtdoops.  */

#ifdef CONFIG_ETRAX_WATCHDOG_NICE_DOGGY
	reset_watchdog();
#endif
	do_exit(SIGSEGV);
}
开发者ID:EMFPGA,项目名称:linux_media,代码行数:32,代码来源:traps.c


示例13: do_invalid_tss

void
do_invalid_tss(struct pt_regs *regs, unsigned int vector)
{
	printk("Invalid TSS Exception)\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例14: do_double_fault

void
do_double_fault(struct pt_regs *regs, unsigned int vector)
{
	printk("Double Fault Exception\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例15: do_device_not_available

void
do_device_not_available(struct pt_regs *regs, unsigned int vector)
{
	printk("Device Not Available Exception\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例16: do_bounds

void
do_bounds(struct pt_regs *regs, unsigned int vector)
{
	printk("Bounds Exception\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例17: do_stack_segment

void
do_stack_segment(struct pt_regs *regs, unsigned int vector)
{
	printk("Stack Segment Exception\n");
	show_registers(regs);
	while (1) {}
}
开发者ID:HobbesOSR,项目名称:kitten,代码行数:7,代码来源:interrupts.c


示例18: show_regs

void show_regs(struct pt_regs *regs)
{
    extern void show_registers(struct pt_regs *regs);

    show_regs_print_info(KERN_DEFAULT);
    /* __PHX__ cleanup this mess */
    show_registers(regs);
}
开发者ID:jansonzhou,项目名称:linux,代码行数:8,代码来源:process.c


示例19: nmi_watchdog_tick

void nmi_watchdog_tick (struct pt_regs * regs)
{

   /*
    * Since current_thread_info()-> is always on the stack, and we
    * always switch the stack NMI-atomically, it's safe to use
    * smp_processor_id().
    */
   int sum, cpu = smp_processor_id();

   sum = irq_stat[cpu].apic_timer_irqs;

   if (last_irq_sums[cpu] == sum) {
      /*
       * Ayiee, looks like this CPU is stuck ...
       * wait a few IRQs (5 seconds) before doing the oops ...
       */
      alert_counter[cpu]++;
      if (alert_counter[cpu] == 5*nmi_hz) {
         spin_lock(&nmi_print_lock);
         /*
          * We are in trouble anyway, lets at least try
          * to get a message out.
          */
         bust_spinlocks(1);
         printk("NMI Watchdog detected LOCKUP on CPU%d, eip %08lx, registers:\n", cpu, regs->eip);
         show_registers(regs);
         printk("console shuts up ...\n");
         console_silent();
         spin_unlock(&nmi_print_lock);
         bust_spinlocks(0);
         do_exit(SIGSEGV);
      }
   } else {
      last_irq_sums[cpu] = sum;
      alert_counter[cpu] = 0;
   }
   if (nmi_perfctr_msr) {
      if (nmi_perfctr_msr == MSR_P4_IQ_COUNTER0) {
         /*
          * P4 quirks:
          * - An overflown perfctr will assert its interrupt
          *   until the OVF flag in its CCCR is cleared.
          * - LVTPC is masked on interrupt and must be
          *   unmasked by the LVTPC handler.
          */
         wrmsr(MSR_P4_IQ_CCCR0, P4_NMI_IQ_CCCR0, 0);
         apic_write(APIC_LVTPC, APIC_DM_NMI);
      }
      else if (nmi_perfctr_msr == MSR_P6_PERFCTR0) {
         /* Only P6 based Pentium M need to re-unmask
          * the apic vector but it doesn't hurt
          * other P6 variant */
         apic_write(APIC_LVTPC, APIC_DM_NMI);
      }
      wrmsr(nmi_perfctr_msr, -(cpu_khz/nmi_hz*1000), -1);
   }
}
开发者ID:OS2World,项目名称:DRV-LXAPI32,代码行数:58,代码来源:lak_nmi.c


示例20: show_regs

void show_regs(struct pt_regs *regs)
{
	show_regs_print_info(KERN_DEFAULT);
	show_registers(regs);
	/* Show stack backtrace if pt_regs is from kernel mode */
	if (!user_mode(regs))
		show_trace(NULL, (unsigned long *) regs->gprs[15]);
	show_last_breaking_event(regs);
}
开发者ID:AdaLovelance,项目名称:lxcGrsecKernels,代码行数:9,代码来源:dumpstack.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ show_regs函数代码示例发布时间:2022-05-30
下一篇:
C++ show_prompt函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap