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

C++ debug_init函数代码示例

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

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



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

示例1: main

int main(void) {
    // leds:
    led_init();

    // init clock sources:
    clocksource_init();

    // init ios
    io_init();

    // init debug
    debug_init();

    // init wdt timer
    wdt_init();

    // enable timeout routines
    timeout_init();

    // init storage
    storage_init();

    // init frsky core
    frsky_init();

    // init adc
    adc_init();

    // init output
#ifdef SBUS_ENABLED
    sbus_init();
#else  // SBUS_ENABLED
    ppm_init();
#endif  // SBUS_ENABLED

    // init failsafe
    failsafe_init();

    // init telemetry
    telemetry_init();

    // run main
    debug("main: init done\n");

    // frsky_frame_sniffer();
    frsky_main();

    debug("main: frsky main ended?! THIS SHOULD NOT HAPPEN!");
    while (1) {}
}
开发者ID:OpenUAS,项目名称:OpenSky,代码行数:50,代码来源:main.c


示例2: main

// application entry point
int main () {
    osjob_t initjob;

    // initialize runtime env
    os_init();
    // initialize debug library
    debug_init();
    // setup initial job
    os_setCallback(&initjob, initfunc);
    // execute scheduled jobs and events
    os_runloop();
    // (not reached)
    return 0;
}
开发者ID:kaaLabs15,项目名称:LoRa,代码行数:15,代码来源:main.c


示例3: __tgmlog_dbg_get_channel_flags

/* get the flags to use for a given channel, possibly setting them too in case of lazy init */
unsigned char __tgmlog_dbg_get_channel_flags( struct __tgmlog_debug_channel *channel )
{
	if (nb_debug_options == -1) debug_init();

	if (nb_debug_options)
	{
		struct __tgmlog_debug_channel *opt = bsearch( channel->name, debug_options, nb_debug_options,
			sizeof(debug_options[0]), cmp_name );
		if (opt) return opt->flags;
	}
	/* no option for this channel */
	if (channel->flags & (1 << __TGMLOG_DBCL_INIT)) channel->flags = default_flags;
	return default_flags;
}
开发者ID:sunfirefox,项目名称:tangramcom,代码行数:15,代码来源:tgmlog.c


示例4: i386_init

void i386_init() {

	extern char edata[], end[];

	// Before doing anything else, complete the ELF loading process.
	// Clear the uninitialized global data (BSS) section of our program.
	// This ensures that all static/global variables start out zero.
	// memset(edata, 0, end - edata);

  debug_init();

  // call `main` function written in Rust
   main();
}
开发者ID:xcodevn,项目名称:rxv6,代码行数:14,代码来源:init.c


示例5: machdep

void
machdep()
{
	pdc_init();
#ifdef notyet
	debug_init();
#endif
	cninit();

#ifdef PDCDEBUG
	if (debug) {
		printf("SSTOR:\n");
		printf("pri_boot=");	DEVPATH_PRINT(&sstor.ss_pri_boot);
		printf("alt_boot=");	DEVPATH_PRINT(&sstor.ss_alt_boot);
		printf("console =");	DEVPATH_PRINT(&sstor.ss_console);
		printf("keyboard=");	DEVPATH_PRINT(&sstor.ss_keyboard);
		printf("mem=%d, fn=%s, osver=%d\n"
		       "os={%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,\n"
		           "%x,%x,%x,%x,%x,%x,%x,%x,%x,%x,%x}\n",
		       sstor.ss_fast_size, sstor.ss_filenames,
		       sstor.ss_os_version,
		       sstor.ss_os[0], sstor.ss_os[1], sstor.ss_os[2],
		       sstor.ss_os[3], sstor.ss_os[4], sstor.ss_os[5],
		       sstor.ss_os[6], sstor.ss_os[7], sstor.ss_os[8],
		       sstor.ss_os[9], sstor.ss_os[10], sstor.ss_os[11],
		       sstor.ss_os[12], sstor.ss_os[13], sstor.ss_os[14],
		       sstor.ss_os[15], sstor.ss_os[16], sstor.ss_os[17],
		       sstor.ss_os[18], sstor.ss_os[19], sstor.ss_os[20],
		       sstor.ss_os[21]);

		printf("PAGE0:\n");
		printf("ivec=%x, pf=%p[%u], toc=%p[%u], rendz=%p\n"
		       "mem: cont=%u, phys=%u, pdc_spa=%u, resv=%u, free=%x\n"
		       "cpu_hpa=%p, pdc=%p, imm_hpa=%p[%u,%u]\n"
		       "soft=%u, tic/10ms=%u\n",
		       PAGE0->ivec_special, PAGE0->ivec_mempf,
		       PAGE0->ivec_mempflen, PAGE0->ivec_toc,
		       PAGE0->ivec_toclen, PAGE0->ivec_rendz,
		       PAGE0->memc_cont, PAGE0->memc_phsize, PAGE0->memc_adsize,
		       PAGE0->memc_resv, PAGE0->mem_free, PAGE0->mem_hpa,
		       PAGE0->mem_pdc, PAGE0->imm_hpa, PAGE0->imm_spa_size,
		       PAGE0->imm_max_mem, PAGE0->imm_soft_boot,
		       PAGE0->mem_10msec);
		printf("console:  ");	PZDEV_PRINT(&PAGE0->mem_cons);
		printf("boot:     ");	PZDEV_PRINT(&PAGE0->mem_boot);
		printf("keyboard: ");	PZDEV_PRINT(&PAGE0->mem_kbd);
	}
#endif
}
开发者ID:MarginC,项目名称:kame,代码行数:49,代码来源:machdep.c


示例6: startup

void startup(void)
{
#ifdef DEBUG
	debug_init();
#endif
	board_init();
	system_initial();
	__goto_psp_mode();
	system_thread_create();
	__goto_user_mode();
	user_thread_create();
	thread_start();
	
	while(1);
}
开发者ID:WalkingScorpion,项目名称:Scorpio,代码行数:15,代码来源:startup.c


示例7: read_debugging_info

void *
read_debugging_info (bfd *abfd, asymbol **syms, long symcount, bfd_boolean no_messages)
{
  void *dhandle;
  bfd_boolean found;

  dhandle = debug_init ();
  if (dhandle == NULL)
    return NULL;

  if (! read_section_stabs_debugging_info (abfd, syms, symcount, dhandle,
					   &found))
    return NULL;

  if (bfd_get_flavour (abfd) == bfd_target_aout_flavour)
    {
      if (! read_symbol_stabs_debugging_info (abfd, syms, symcount, dhandle,
					      &found))
	return NULL;
    }

  if (bfd_get_flavour (abfd) == bfd_target_ieee_flavour)
    {
      if (! read_ieee_debugging_info (abfd, dhandle, &found))
	return NULL;
    }

  /* Try reading the COFF symbols if we didn't find any stabs in COFF
     sections.  */
  if (! found
      && bfd_get_flavour (abfd) == bfd_target_coff_flavour
      && symcount > 0)
    {
      if (! parse_coff (abfd, syms, symcount, dhandle))
	return NULL;
      found = TRUE;
    }

  if (! found)
    {
      if (! no_messages)
	non_fatal (_("%s: no recognized debugging information"),
		   bfd_get_filename (abfd));
      return NULL;
    }

  return dhandle;
}
开发者ID:CromFr,项目名称:gdb,代码行数:48,代码来源:rddbg.c


示例8: init

//init
//Initializes variables in main and in other files
void init() {
  seconds = 0;

  #ifdef DEBUG_ACTIVE
  //Only if we are debugging, we initialize the varialbes in the debug file
  debug_init();
  #endif
  init_update();

  //We initialize variables in other files
  #ifdef DEBUG_ACTIVE
  movement_init();
  #endif
  phase1_init();
  phase2_init();
}
开发者ID:angel-manuel,项目名称:COSMOSpheres,代码行数:18,代码来源:main.cpp


示例9: main_loops_init

void main_loops_init(void) {
    system_init();
    debug_init();
    input_init();
    button_init();
    comm_init();
    draw_init(TGL_UPDATE_RATE);
    pacer_init(DISPLAY_TASK_RATE);

    tinygl_font_set (TGL_FONT);
    tinygl_text_speed_set (TGL_TEXT_SPEED);
    tinygl_text_dir_set (TINYGL_TEXT_DIR_ROTATE);
    tinygl_text_mode_set (TINYGL_TEXT_MODE_SCROLL);
    
    TRACE("\n\n\n**UCFK initialised.**\n");
}
开发者ID:Top-Dog,项目名称:ENCE260-Game-Pong,代码行数:16,代码来源:main_loops.c


示例10: main

int main(void)
{
	bsp_init();

	debug_init(DBG_LEVEL_TRACE | DBG_LEVEL_INFO | DBG_LEVEL_WARNING |
	           DBG_LEVEL_ERROR);

	esn_detect_init();
	esn_active_init();

	stack_init();

	vTaskStartScheduler();

	return 0;
}
开发者ID:yhecnu,项目名称:esn,代码行数:16,代码来源:main.c


示例11: main

int main(int argc, char **argv)
{
  
  //si_ui_init();
	debug_init();
	init_random();
	Lift = lift_create();
	sem_init(&mutex,0,0);
        // Create tasks as appropriate here
	/* create tasks */ 
	//pthread_t user_thread_handle;
	pthread_t lift_thread_handle;
	//pthread_create(&user_thread_handle, NULL, user_thread, 0);
	pthread_create(&lift_thread_handle, NULL, lift_thread, 0);

		
	int i;
	for(i = 0; i < MAX_N_PERSONS; i++){
	  pthread_t handle;
	  pthread_create(&handle, NULL, passenger_thread, (void*) &i);
	  
	  sem_wait(&mutex);
	  
	  // Set the real-time priority of the current thread to 5
	  // If you want to set the priority of another thread, specify the
	  // appropriate pthread_t instead of the pthread_self() function.
	  struct sched_param p;
	  if(i == 2){
	    p.sched_priority = 10;
	  }else{
	    p.sched_priority = 1;
	  }
	  if(pthread_setschedparam(handle, SCHED_RR, &p) != 0){
	    perror("Could not set the thread priority");
	  }
	  
	  
	  pthread_detach(handle); // Ensure resources are reclaimed appropriately
	}
	
	
	pthread_join(lift_thread_handle, NULL);
	//pthread_join(user_thread_handle, NULL);
	
	
	return 0;
}
开发者ID:klockowandt,项目名称:TSEA81,代码行数:47,代码来源:main.c


示例12: main

int main(void)
{
    //run at 8 Mhz
    CLKPR = 0x80;
    CLKPR = 0x00;

    io_init();
    edge_interrupts_init();
    usart_init();
    buffers_init();
    debug_init();

    sei();

    for(;;)
    {
        if(UCSR0A & (1 << RXC0))
        {
            cli();
            if(rx_buffer_size_cache == 0)
            {
                rx_buffer_cahce = UDR0;
                rx_buffer_size_cache++;
                sei();
            }
            else
            {
                if(rx_buffer_size_cache <= BUF_MAX_SIZE)
                {
                    buffer_put(&rx_buffer, UDR0);
                    rx_buffer_size_cache++;
                }
                sei();
            }
        }


        if(tx_buffer_size_cache != 0)
        {
            usart_send(buffer_take(&tx_buffer));
            tx_buffer_size_cache--;
        }

    }

    return 0;
}
开发者ID:theepot,项目名称:esc64,代码行数:47,代码来源:dev_usart.c


示例13: _gpgme_debug_begin

/* Start a new debug line in *LINE, logged at level LEVEL or higher,
   and starting with the formatted string FORMAT.  */
void
_gpgme_debug_begin(void **line, int level, const char *format, ...)
{
    va_list arg_ptr;

    debug_init();
    if(debug_level < level)
    {
        /* Disable logging of this line.  */
        *line = NULL;
        return;
    }

    va_start(arg_ptr, format);
    vasprintf((char **) line, format, arg_ptr);
    va_end(arg_ptr);
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:19,代码来源:debug.c


示例14: main

int main(int argc, const char *argv[])
{
	const char *mips_elf_filename;
	const char *new_argv[argc];
	int i, new_argc = 0;

	debug_init("/tmp/hoodwink.log");
	debug("Hoodwink starting\n");

	/* skip hoodwink program name */
	argv++;
	argc--;

	if (argc && !strcmp(argv[0], "-U")) {
		argv += 2;
		argc -= 2;
	}

	if (argc && !strcmp(argv[0], "-0")) {
		argv += 2;
		argc -= 2;
	}

	if (argc < 1) {
		debug("No MIPS ELF specified\n");
		sys_exit(1);
	} else {
		mips_elf_filename = argv[0];
		argv++;
		argc--;
	}

	debug("MIPS ELF: \"%s\"\n", mips_elf_filename);

	new_argv[new_argc++] = mips_elf_filename;

	for (i = 0; i < argc; i++)
		new_argv[new_argc++] = argv[i];

	debug("Arguments:\n");
	for (i = 0; i < new_argc; i++)
		debug("  [%d] = \"%s\"\n", i, new_argv[i]);

	frontend_init(mips_elf_filename, new_argc, new_argv);
	return 0;
}
开发者ID:paulburton,项目名称:hoodwink,代码行数:46,代码来源:main.c


示例15: main

int main(void)
{
	uint32_t err_code;
	bool erase_bonds;
	
	/* Initialise debugging port */
  debug_init();
  debug_printf("Debug port opened... Initialising...\r\n");
	
	/* Initialise GPIO subsystem */
	err_code = nrf_drv_gpiote_init();
	if (err_code == NRF_SUCCESS)
		debug_printf("GPIOTE initialised!\r\n");
	else
	{
			debug_printf("Ooops.. Something is wrong with initialising GPIOTE..\r\n");
			APP_ERROR_CHECK(err_code);
	}

	led_init();
	adc_init();
	debug_printf("Visual feedback should be active!\r\n");
	
	timers_init();
	ble_stack_init();
	beacon_adv_init();
	device_manager_init(erase_bonds);
	gap_params_init();
	advertising_init();
	services_init();
	conn_params_init();
	
	application_timers_start();
  advertising_start();
	
	led_rgb_set(LED_RED, true);
	led_rgb_set(LED_GREEN, false);
	led_rgb_set(LED_BLUE, false);
	
	debug_printf("Readyyy.. \r\n");
	
  while (true)
  {
		power_manage();
	}
}
开发者ID:stelios26,项目名称:Aphrodite,代码行数:46,代码来源:main.c


示例16: __tgmlog_dbg_set_channel_flags

/* set the flags to use for a given channel; return 0 if the channel is not available to set */
int __tgmlog_dbg_set_channel_flags( struct __tgmlog_debug_channel *channel,
								 unsigned char set, unsigned char clear )
{
	if (nb_debug_options == -1) debug_init();

	if (nb_debug_options)
	{
		struct __tgmlog_debug_channel *opt = bsearch( channel->name, debug_options, nb_debug_options,
			sizeof(debug_options[0]), cmp_name );
		if (opt)
		{
			opt->flags = (opt->flags & ~clear) | set;
			return 1;
		}
	}
	return 0;
}
开发者ID:sunfirefox,项目名称:tangramcom,代码行数:18,代码来源:tgmlog.c


示例17: main

int main(void) {
	platform_init();

	debug_init();
	DEBUG_PRINT("Booting...\n\n");

	com_init();
	
	spi_init();

	init_framebuffer(framebuffer1);
	init_framebuffer(framebuffer2);

	DEBUG_PRINT("Booted.\n");

	while(1);
}
开发者ID:arnew,项目名称:matelight,代码行数:17,代码来源:main.c


示例18: main

int main(void) {
    // Set the system clock to the full 120MHz
    uint32_t sysClkFreq = SysCtlClockFreqSet(SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480, 120000000);


    debug_init(sysClkFreq);
    status_led_init();
    network_driver_init(sysClkFreq);
    networking_init();
    telemetry_init();
    transducer_init();
    thermocouple_init();
    solenoid_init();

    debug_print("Initialization complete. starting main loop.\r\n");

    // Set up the SysTick timer and its interrupts
    SysTickPeriodSet(6000); // 40 kHz
    SysTickIntRegister(sys_tick);
    SysTickIntEnable();
    SysTickEnable();

    uint32_t loopIterations = 0;
    uint32_t frame_start = systick_clock;



    while(1) {
        status_led_periodic();
        network_driver_periodic();
        telemetry_periodic();
        solenoid_periodic();

        //	debug_print_u32(systick_clock);

        //count loop iterations per second
        loopIterations++;
        if(systick_clock - frame_start >= 1000) {
            loops_per_second = loopIterations;
            loopIterations = 0;
            frame_start = systick_clock;
        }

    }
}
开发者ID:jeyoder,项目名称:LRAPropulsion,代码行数:45,代码来源:main.c


示例19: main

/*
 * Loader main routine
 *
 * We assume that the following machine state has
 * been already set before this routine.
 *	- CPU is initialized.
 *	- DRAM is configured.
 *	- Loader BSS section is filled with 0.
 *	- Loader stack is configured.
 *	- All interrupts are disabled.
 */
int
main(void)
{
	entry_t entry;

	memset(bootinfo, 0, BOOTINFOSZ);

	/*
	 * Initialize debug port.
	 */
	debug_init();

	DPRINTF(("Prex Boot Loader\n"));

	/*
	 * Do platform dependent initialization.
	 */
	startup();

	/*
	 * Show splash screen.
	 */
	splash();

	/*
	 * Load OS modules to appropriate locations.
	 */
	load_os();

	/*
	 * Dump boot infomation for debug.
	 */
	dump_bootinfo();

	/*
	 * Launch kernel.
	 */
	entry = (entry_t)kvtop(bootinfo->kernel.entry);
	DPRINTF(("Entering kernel (at 0x%lx) ...\n\n", (long)entry));
	(*entry)();

	panic("Oops!");
	/* NOTREACHED */
	return 0;
}
开发者ID:m943040028,项目名称:prex,代码行数:56,代码来源:main.c


示例20: _gpgme_debug

/* Log the formatted string FORMAT at debug level LEVEL or higher.  */
void
_gpgme_debug(int level, const char *format, ...)
{
    va_list arg_ptr;

    debug_init();
    if(debug_level < level)
        return;

    va_start(arg_ptr, format);
    LOCK(debug_lock);
    vfprintf(errfp, format, arg_ptr);
    va_end(arg_ptr);
    if(format && *format && format[strlen(format) - 1] != '\n')
        putc('\n', errfp);
    UNLOCK(debug_lock);
    fflush(errfp);
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:19,代码来源:debug.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ debug_log函数代码示例发布时间:2022-05-30
下一篇:
C++ debug_info函数代码示例发布时间: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