void __init init_IRQ(void) { int i; DANUBE_INT_DMSG("init_IRQ\n"); board_be_handler = &danube_be_handler; init_generic_irq(); /* mask all interrupt sources */ *DANUBE_ICU_IM0_IER = 0; *DANUBE_ICU_IM1_IER = 0; *DANUBE_ICU_IM2_IER = 0; *DANUBE_ICU_IM3_IER = 0; *DANUBE_ICU_IM4_IER = 0; /* Now safe to set the exception vector. */ set_except_vector(0, mipsIRQ); for (i = 0; i <= INT_NUM_IM4_IRL31; i++) { irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; irq_desc[i].handler = &danube_irq_type; } set_c0_status(IE_IRQ0 | IE_IRQ1 | IE_IRQ2 | IE_IRQ3 | IE_IRQ4 | IE_IRQ5); #ifdef CONFIG_KGDB set_debug_traps(); breakpoint(); #endif }
void __init init_IRQ(void) { int i; /* * Mask out all interrupt by writing "1" to all bit position in * the interrupt reset reg. */ atlas_hw0_icregs->intrsten = 0xffffffff; /* Now safe to set the exception vector. */ set_except_vector(0, mipsIRQ); for (i = 0; i <= ATLASINT_END; i++) { irq_desc[i].status = IRQ_DISABLED; irq_desc[i].action = 0; irq_desc[i].depth = 1; irq_desc[i].handler = &atlas_irq_type; } #ifdef CONFIG_REMOTE_DEBUG if (remote_debug) { set_debug_traps(); breakpoint(); } #endif }
void kmain(s64 magic, s64 info) { //vga_clear(COLOR_BLACK); idt_init(); isr_init(); serial_init(); set_debug_traps(); BREAKPOINT(); cpuid_print(); multiboot(magic, info); kmem_map(); page_init(); kmalloc_init(); //vesa_init(); root_init(); pci_init(); vm_init(); syscall_init(); timer_init(); kbd_init(); //mouse_init(); console_init(); create_kthread(NULL, idle_thread, THREAD_PRI_LOW, NULL, NULL); create_kthread(NULL, init_thread, THREAD_PRI_NORMAL, NULL, NULL); thread_schedule(); }
int main () { #ifdef usestubs set_debug_traps (); breakpoint (); #endif #ifdef SIG_SETMASK /* Ensure all the signals aren't blocked. The environment in which the testsuite is run may have blocked some for whatever reason. */ { sigset_t newset; sigemptyset (&newset); sigprocmask (SIG_SETMASK, &newset, NULL); } #endif signal (SIGABRT, handle_signal); /* Stop here so we can hand-call gen_signal. */ stop_one (); /* When we're resumed stop here. */ stop_two (); /* When we're resumed we generate a signal ourselves. */ gen_signal (); return 0; }
void __init init_IRQ(void) { /* Invoke board-specific irq setup */ irq_setup(); #ifdef CONFIG_REMOTE_DEBUG extern void breakpoint(void); extern void set_debug_traps(void); extern void rs_kgdb_hook(void); rs_kgdb_hook(); clear_cp0_status(STATUSF_IP2); clear_cp0_status(STATUSF_IP3); clear_cp0_status(STATUSF_IP4); clear_cp0_status(STATUSF_IP5); clear_cp0_status(STATUSF_IP6); clear_cp0_status(STATUSF_IP7); printk("Wait for gdb client connection ...\n"); set_debug_traps(); set_cp0_status(STATUSF_IP2); set_cp0_status(STATUSF_IP3); set_cp0_status(STATUSF_IP4); set_cp0_status(STATUSF_IP5); set_cp0_status(STATUSF_IP6); set_cp0_status(STATUSF_IP7); breakpoint(); #endif }
main() { #ifdef usestubs set_debug_traps (); breakpoint (); #endif foo (); }
int main() { /* Where are these from? It depends on the stub file for the * architecture; unfortunately there is no shared header file for all the * stubs yet, though... */ set_debug_traps(); breakpoint(); return 0; }
int main() { #ifdef usestubs set_debug_traps(); breakpoint(); #endif L1 = fun1(); return 0; }
__initfunc(static void sgi_irq_setup(void)) { sgint_init(); #ifdef CONFIG_REMOTE_DEBUG if (remote_debug) set_debug_traps(); breakpoint(); /* you may move this line to whereever you want :-) */ #endif }
int main() { #ifdef usestubs set_debug_traps (); breakpoint (); #endif foo(); bar(); return 0; }
int main () { register int local; #ifdef usestubs set_debug_traps(); breakpoint(); #endif driver (); printf("exiting\n"); }
/*=========================================================================*\ | Function: | \*-------------------------------------------------------------------------*/ int serdbg_init_dbg ( /*-------------------------------------------------------------------------*\ | Purpose: | | initialize remote gdb session over serial line | +---------------------------------------------------------------------------+ | Input Parameters: | \*-------------------------------------------------------------------------*/ void ) /*-------------------------------------------------------------------------*\ | Return Value: | | rtems_status_code | \*=========================================================================*/ { static bool is_initialized = false; rtems_status_code rc = RTEMS_SUCCESSFUL; if (is_initialized) { return RTEMS_SUCCESSFUL; } is_initialized = true; /* * try to open serial device */ if (rc == RTEMS_SUCCESSFUL) { if ((serdbg_conf.open_io != NULL) && (0 > serdbg_conf.open_io(serdbg_conf.devname,serdbg_conf.baudrate))) { fprintf(stderr, "remote_gdb_init: cannot open device %s " "for gdb connection:%s\n",serdbg_conf.devname,strerror(errno)); rc = RTEMS_IO_ERROR; } } /* * initialize gdb stub */ if (rc == RTEMS_SUCCESSFUL) { set_debug_traps(); } /* * now activate gdb stub */ if ((rc == RTEMS_SUCCESSFUL) && !serdbg_conf.skip_init_bkpt) { breakpoint(); } /* * return to original function * this may be already unter gdb control */ return rc; }
static void __init malta_irq_setup(void) { maltaint_init(); #ifdef CONFIG_REMOTE_DEBUG if (remote_debug) { set_debug_traps(); breakpoint(); } #endif }
void __init init_IRQ(void) { int i; unsigned long flags; memset(irq_desc, 0, sizeof(irq_desc)); set_except_vector(0, it8172_IRQ); init_generic_irq(); /* mask all interrupts */ it8172_hw0_icregs->lb_mask = 0xffff; it8172_hw0_icregs->lpc_mask = 0xffff; it8172_hw0_icregs->pci_mask = 0xffff; it8172_hw0_icregs->nmi_mask = 0xffff; /* make all interrupts level triggered */ it8172_hw0_icregs->lb_trigger = 0; it8172_hw0_icregs->lpc_trigger = 0; it8172_hw0_icregs->pci_trigger = 0; it8172_hw0_icregs->nmi_trigger = 0; /* active level setting */ /* uart, keyboard, and mouse are active high */ it8172_hw0_icregs->lpc_level = (0x10 | 0x2 | 0x1000); it8172_hw0_icregs->lb_level |= 0x20; /* keyboard and mouse are edge triggered */ it8172_hw0_icregs->lpc_trigger |= (0x2 | 0x1000); #if 0 // Enable this piece of code to make internal USB interrupt // edge triggered. it8172_hw0_icregs->pci_trigger |= (1 << (IT8172_USB_IRQ - IT8172_PCI_DEV_IRQ_BASE)); it8172_hw0_icregs->pci_level &= ~(1 << (IT8172_USB_IRQ - IT8172_PCI_DEV_IRQ_BASE)); #endif for (i = 0; i <= IT8172_LAST_IRQ; i++) { irq_desc[i].handler = &it8172_irq_type; } irq_desc[MIPS_CPU_TIMER_IRQ].handler = &cp0_irq_type; set_cp0_status(ALLINTS_NOTIMER); #ifdef CONFIG_REMOTE_DEBUG /* If local serial I/O used for debug port, enter kgdb at once */ puts("Waiting for kgdb to connect..."); set_debug_traps(); breakpoint(); #endif }
main () { #ifdef usestubs set_debug_traps(); breakpoint(); #endif func1 (); printf("in main after func1\n"); tmp2 = func2 (); tmp3 = func3 (); printf("exiting\n"); }
void __init init_IRQ(void) { set_except_vector(0, mipsIRQ); init_generic_irq(); init_i8259_irqs(); #ifdef CONFIG_REMOTE_DEBUG if (remote_debug) { set_debug_traps(); breakpoint(); } #endif }
main () { #ifdef usestubs set_debug_traps(); breakpoint(); #endif malloc(1); /* Prevent AIX linker from removing variables. */ return ctable1[0] + ctable2[0] + int1dim[0] + int2dim[0][0] + int3dim[0][0][0] + int4dim[0][0][0][0] + teststring[0] + *parrays -> array1; }
void __init arch_init_irq(void) { int i; //extern irq_desc_t irq_desc[]; /* init CPU irqs */ mips_cpu_irq_init(); /* init sys irqs */ sys_irq_base = M36_SYS_IRQ_BASE; for (i=sys_irq_base; i < sys_irq_base + M36_NUM_SYS_IRQ; i++) irq_set_chip_and_handler(i, &sys_irq_controller,handle_percpu_irq); /* Default all ICU IRQs to off and enable IM bit(IP3) of CP0 status for sys IRQ */ #if 1 *((unsigned long *)(0xB8000038)) = 0; *((unsigned long *)(0xB800003C)) = 0; *((unsigned long *)(0xB80000EC)) = 0; write_c0_status(read_c0_status() | STATUSF_IP3); #else *M6303_MSYSINT1REG = 0; *M6303_MSYSINT2REG = 0; #endif #ifdef CONFIG_REMOTE_DEBUG printk("Setting debug traps - please connect the remote debugger.\n"); set_debug_traps(); // you may move this line to whereever you want breakpoint(); #endif if((*(unsigned short *)0xB8000002 == 0x3901) \ || (*(unsigned short *)0xB8000002 == 0x3701) \ || (*(unsigned short *)0xB8000002 == 0x3503)) { sys_rpc_addr = 0xB8040037; sys_rpc_mask = 0x0C; sys_rpc_irq1_mask = 0x08; sys_rpc_irq2_mask = 0x04; } else { sys_rpc_addr = 0xB8040036; sys_rpc_mask = 0xC0; sys_rpc_irq1_mask = 0x80; sys_rpc_irq2_mask = 0x40; } }
void __init init_IRQ(void) { #ifdef CONFIG_REMOTE_DEBUG extern void breakpoint(void); extern void set_debug_traps(void); printk("Wait for gdb client connection ...\n"); set_debug_traps(); breakpoint(); #endif /* Invoke board-specific irq setup */ irq_setup(); }
int main () { #ifdef usestubs set_debug_traps(); breakpoint(); #endif struct1.val = 1; struct2.val = 2; ptr1 = &struct1; ptr2 = &struct2; marker1 (); func1 (); for (count = 0; count < 4; count++) { ival1 = count; ival3 = count; ival4 = count; } ival1 = count; /* Outside loop */ ival2 = count; ival3 = count; ival4 = count; marker2 (); if (doread) { static char msg[] = "type stuff for buf now:"; write (1, msg, sizeof (msg) - 1); read (0, &buf[0], 5); } marker4 (); /* We have a watchpoint on ptr1->val. It should be triggered if ptr1's value changes. */ ptr1 = ptr2; /* This should not trigger the watchpoint. If it does, then we used the wrong value chain to re-insert the watchpoints or we are not evaluating the watchpoint expression correctly. */ struct1.val = 5; marker5 (); /* We have a watchpoint on ptr1->val. It should be triggered if ptr1's value changes. */ ptr1 = ptr2; /* This should not trigger the watchpoint. If it does, then we used the wrong value chain to re-insert the watchpoints or we are not evaluating the watchpoint expression correctly. */ struct1.val = 5; marker5 (); return 0; }
void debug_gdb (void) { #ifdef DEBUG_GDB static bool f = false; if (!f) { f = true; printf ("gdb set_debug_traps\n"); set_debug_traps (); printf ("gdb breakpoint\n"); breakpoint (); } #endif }
int main (int argc, char **argv) { int i; #ifdef usestubs set_debug_traps(); breakpoint(); #endif for (i = 0; i < 100; i++) printf (">>> %d\n", i); /* euphonium */ return 0; }
int command_main(int argc, char *argv[]) { char *p; int size; long prev_time; send_use(SERIAL_DEFAULT_DEVICE); while (1) { send_write("command> "); /* プロンプト表示 */ /* コンソールからの受信文字列を受け取る */ kz_recv(MSGBOX_ID_CONSINPUT, &size, &p); if (p == NULL) { send_write("expired.\n"); continue; } p[size] = '\0'; if (!strncmp(p, "echo", 4)) { /* echoコマンド */ send_write(p + 4); /* echoに続く文字列を出力する */ send_write("\n"); } else if (!strncmp(p, "timer", 5)) { /* timerコマンド */ send_write("timer start.\n"); send_start(1000); } else if (!strncmp(p, "ping", 4)) { /* pingコマンド */ send_write("ping start.\n"); send_icmp(); } else if (!strncmp(p, "tftp", 4)) { /* tftpコマンド */ send_write("tftp start.\n"); send_tftp(); } else if (!strncmp(p, "debug", 5)) { /* デバッガ起動 */ set_debug_traps(); force_break(); } else if (!strncmp(p, "call", 4)) { /* ダミー関数の呼び出し */ send_write(func(p + 4)); } else if (!strncmp(p, "get", 3)) { /* get */ prev_time = get_time(); putxval(prev_time, 8); puts("\n"); } else { send_write("unknown.\n"); } kz_kmfree(p); } return 0; }
void __init ddb_irq_setup(void) { #ifdef CONFIG_REMOTE_DEBUG if (remote_debug) set_debug_traps(); breakpoint(); /* you may move this line to whereever you want :-) */ #endif request_region(0x20, 0x20, "pic1"); request_region(0xa0, 0x20, "pic2"); i8259_setup_irq(2, &irq2); nile4_irq_setup(); m1543_irq_setup(); set_except_vector(0, ddbIRQ); }
void __init init_IRQ(void) { #ifdef CONFIG_KGDB extern void breakpoint(void); extern void set_debug_traps(void); printk("Wait for gdb client connection ...\n"); set_debug_traps(); breakpoint(); #endif /* set up default irq controller */ init_generic_irq(); /* invoke board-specific irq setup */ irq_setup(); }
int main() { char C, *pC, **ppC, ***pppC, ****ppppC, *****pppppC, ******ppppppC; unsigned char UC, *pUC; short S, *pS; unsigned short US, *pUS; int I, *pI; unsigned int UI, *pUI; long L, *pL; unsigned long UL, *pUL; float F, *pF; double D, *pD; C = 'A'; UC = 21; S = -14; US = 7; I = 102; UI = 1002; L = -234; UL = 234; F = 1.25E10; D = -1.375E-123; pC = &C; ppC = &pC; pppC = &ppC; ppppC = &pppC; pppppC = &ppppC; ppppppC = &pppppC; pUC = &UC; pS = &S; pUS = &US; pI = &I; pUI = &UI; pL = &L; pUL = &UL; pF = &F; pD = &D; #ifdef usestubs set_debug_traps(); breakpoint(); #endif marker1(); return 0; }
/* * We use kgdb_early_setup so that functions we need to call now don't * cause trouble when called again later. */ int kgdb_arch_init(void) { /* Board-specifics. */ /* Force some calls to happen earlier. */ if (kgdb_early_setup == 0) { trap_init(); init_IRQ(); kgdb_early_setup = 1; } /* Set our traps. */ /* This needs to be done more finely grained again, paired in * a before/after in kgdb_handle_exception(...) -- Tom */ set_debug_traps(); notifier_chain_register(&mips_die_chain, &kgdb_notifier); return 0; }
int main () { #ifdef usestubs set_debug_traps(); breakpoint(); #endif for (count = 0; count < 4; count++) { ival1 = count; ival2 = count; ival3 = count; ival4 = count; } ival1 = count; ival2 = count; /* Outside loop */ ival3 = count; ival4 = count; return 0; }
int main () { struct { char c[100]; } cbig; struct { int i[800]; } ibig; struct { long l[900]; } lbig; struct { float f[200]; } fbig; struct { double d[300]; } dbig; struct { short s[400]; } sbig; ibig.i[100] = 5; cbig.c[0] = '\0'; cbig.c[100] = 'A'; fbig.f[100] = 11.99999; dbig.d[202] = 9.99999999; sbig.s[90] = 255; lbig.l[333] = 999999999; #ifdef usestubs set_debug_traps (); breakpoint (); #endif marker1 (); return 0; }
/* install the handler for exception 0 */ void __init init_IRQ(void) { extern void hpIRQ(void); extern void mips_cpu_irq_init(u32 base); mips_cpu_irq_init(0); set_except_vector(0, hpIRQ); #ifdef CONFIG_REMOTE_DEBUG { extern void breakpoint(void); extern int remote_debug; if (remote_debug) { set_debug_traps(); breakpoint(); } } #endif }