本文整理汇总了C++中report_bug函数的典型用法代码示例。如果您正苦于以下问题:C++ report_bug函数的具体用法?C++ report_bug怎么用?C++ report_bug使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了report_bug函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rb_compile_bug
void
rb_compile_bug(const char *file, int line, const char *fmt, ...)
{
report_bug(file, line, fmt, NULL);
abort();
}
示例2: do_report_trap
void do_report_trap(struct pt_regs *regs, int si_signo, int si_code, char *str)
{
siginfo_t info;
if (user_mode(regs)) {
info.si_signo = si_signo;
info.si_errno = 0;
info.si_code = si_code;
info.si_addr = get_trap_ip(regs);
force_sig_info(si_signo, &info, current);
report_user_fault(regs, si_signo);
} else {
const struct exception_table_entry *fixup;
fixup = search_exception_tables(regs->psw.addr & PSW_ADDR_INSN);
if (fixup)
regs->psw.addr = extable_fixup(fixup) | PSW_ADDR_AMODE;
else {
enum bug_trap_type btt;
btt = report_bug(regs->psw.addr & PSW_ADDR_INSN, regs);
if (btt == BUG_TRAP_TYPE_WARN)
return;
die(regs, str);
}
}
}
示例3: die
/*
* This function is protected against re-entrancy.
*/
void die(const char *str, struct pt_regs *regs, int err)
{
enum bug_trap_type bug_type = BUG_TRAP_TYPE_NONE;
struct thread_info *thread = current_thread_info();
int ret;
oops_enter();
raw_spin_lock_irq(&die_lock);
console_verbose();
bust_spinlocks(1);
if (!user_mode(regs))
bug_type = report_bug(regs->pc, regs);
if (bug_type != BUG_TRAP_TYPE_NONE)
str = "Oops - BUG";
ret = __die(str, err, thread, regs);
if (regs && kexec_should_crash(thread->task))
crash_kexec(regs);
bust_spinlocks(0);
add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
raw_spin_unlock_irq(&die_lock);
oops_exit();
if (in_interrupt())
panic("Fatal exception in interrupt");
if (panic_on_oops)
panic("Fatal exception");
if (ret != NOTIFY_STOP)
do_exit(SIGSEGV);
}
示例4: rb_compile_bug
void
rb_compile_bug(const char *file, int line, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
report_bug(file, line, fmt, args);
va_end(args);
abort();
}
示例5: rb_bug
void
rb_bug(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
report_bug(rb_sourcefile(), rb_sourceline(), fmt, args);
va_end(args);
abort();
}
示例6: handle_BUG
static void handle_BUG(struct pt_regs *regs)
{
enum bug_trap_type tt;
tt = report_bug(regs->pc, regs);
if (tt == BUG_TRAP_TYPE_WARN) {
regs->pc += instruction_size(regs->pc);
return;
}
die("Kernel BUG", regs, TRAPA_BUG_OPCODE & 0xff);
}
示例7: die
/*
* This is gone through when something in the kernel has done something bad
* and is about to be terminated:
*/
void die(const char *str, struct pt_regs *regs, long err)
{
unsigned long flags = oops_begin();
int sig = SIGSEGV;
if (!user_mode_vm(regs))
report_bug(regs->ip, regs);
if (__die(str, regs, err))
sig = 0;
oops_end(flags, regs, sig);
}
示例8: rb_bug
void
rb_bug(const char *fmt, ...)
{
const char *file = NULL;
int line = 0;
if (GET_THREAD()) {
file = rb_sourcefile();
line = rb_sourceline();
}
report_bug(file, line, fmt, NULL);
die();
}
示例9: die
void die(const char *str, struct pt_regs *fp, unsigned long err)
{
static int diecount;
oops_enter();
console_verbose();
spin_lock_irq(&die_lock);
report_bug(fp->pc, fp);
printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++diecount);
dump(fp);
spin_unlock_irq(&die_lock);
do_exit(SIGSEGV);
}
示例10: rb_bug
void
rb_bug(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
report_bug(rb_sourcefile(), rb_sourceline(), fmt, args);
va_end(args);
#if defined(_WIN32) && defined(RT_VER) && RT_VER >= 80
_set_abort_behavior( 0, _CALL_REPORTFAULT);
#endif
abort();
}
示例11: rb_bug_context
void
rb_bug_context(const void *ctx, const char *fmt, ...)
{
const char *file = NULL;
int line = 0;
if (GET_THREAD()) {
file = rb_sourcefile();
line = rb_sourceline();
}
report_bug(file, line, fmt, ctx);
die();
}
示例12: rb_bug
void
rb_bug(const char *fmt, ...)
{
va_list args;
const char *file = NULL;
int line = 0;
if (GET_THREAD()) {
file = rb_sourcefile();
line = rb_sourceline();
}
va_start(args, fmt);
report_bug(file, line, fmt, args);
va_end(args);
#if defined(_WIN32) && defined(RT_VER) && RT_VER >= 80
_set_abort_behavior( 0, _CALL_REPORTFAULT);
#endif
abort();
}
示例13: bug_handler
static int bug_handler(struct pt_regs *regs, unsigned int esr)
{
if (user_mode(regs))
return DBG_HOOK_ERROR;
switch (report_bug(regs->pc, regs)) {
case BUG_TRAP_TYPE_BUG:
die("Oops - BUG", regs, 0);
break;
case BUG_TRAP_TYPE_WARN:
/* Ideally, report_bug() should backtrace for us... but no. */
dump_backtrace(regs, NULL);
break;
default:
/* unknown/unrecognised bug trap type */
return DBG_HOOK_ERROR;
}
/* If thread survives, skip over the BUG instruction and continue: */
regs->pc += AARCH64_INSN_SIZE; /* skip BRK and resume */
return DBG_HOOK_HANDLED;
}
示例14: handle_BUG
static void handle_BUG(struct pt_regs *regs)
{
const struct bug_entry *bug;
unsigned long bugaddr = regs->pc;
enum bug_trap_type tt;
if (!is_valid_bugaddr(bugaddr))
goto invalid;
bug = find_bug(bugaddr);
/* Switch unwinders when unwind_stack() is called */
if (bug->flags & BUGFLAG_UNWINDER)
unwinder_faulted = 1;
tt = report_bug(bugaddr, regs);
if (tt == BUG_TRAP_TYPE_WARN) {
regs->pc += instruction_size(bugaddr);
return;
}
invalid:
die("Kernel BUG", regs, TRAPA_BUG_OPCODE & 0xff);
}
示例15: trap_c
//.........这里部分代码省略.........
sig = SIGTRAP;
CHK_DEBUGGER_TRAP_MAYBE();
if (kernel_mode_regs(fp))
goto traps_done;
else
break;
case VEC_OVFLOW:
info.si_code = TRAP_TRACEFLOW;
sig = SIGTRAP;
strerror = KERN_NOTICE EXC_0x11(KERN_NOTICE);
CHK_DEBUGGER_TRAP_MAYBE();
break;
case VEC_UNDEF_I:
#ifdef CONFIG_BUG
if (kernel_mode_regs(fp)) {
switch (report_bug(fp->pc, fp)) {
case BUG_TRAP_TYPE_NONE:
break;
case BUG_TRAP_TYPE_WARN:
dump_bfin_trace_buffer();
fp->pc += 2;
goto traps_done;
case BUG_TRAP_TYPE_BUG:
panic("BUG()");
}
}
#endif
#ifdef CONFIG_BFIN_PSEUDODBG_INSNS
if (!kernel_mode_regs(fp) && get_instruction(&opcode, (unsigned short *)fp->pc)) {
if (execute_pseudodbg_assert(fp, opcode))
goto traps_done;
if (execute_pseudodbg(fp, opcode))
goto traps_done;
}
#endif
info.si_code = ILL_ILLOPC;
sig = SIGILL;
strerror = KERN_NOTICE EXC_0x21(KERN_NOTICE);
CHK_DEBUGGER_TRAP_MAYBE();
break;
case VEC_ILGAL_I:
info.si_code = ILL_ILLPARAOP;
sig = SIGILL;
strerror = KERN_NOTICE EXC_0x22(KERN_NOTICE);
CHK_DEBUGGER_TRAP_MAYBE();
break;