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


C++ breakpoint函数代码示例

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


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

示例1: command

void command() {
    // Parses a single comment
    Lexer lexer(env);
    lexer.input();
    Token cmd = lexer.token();
    if (cmd.value() == "break") {
        lexer.next();
        Token bp = lexer.token();
        std::stringstream ss(bp.value().substr(1));
        intptr_t addr = 0;
        ss >> addr;
        breakpoint((mach_vm_address_t)addr);
        std::cerr << bp.value() << std::endl;
    } else if (cmd.value() == "run") {
开发者ID:mfichman,项目名称:jogo,代码行数:14,代码来源:Debugger.cpp

示例2: lprint_fatalNoMenu

extern "C" volatile void lprint_fatalNoMenu(const char* file, int line, lprint_format_t msg, ...) {
  Unused(file);
  Unused(line);
  bool saved = PrintVMMessages; PrintVMMessages = true;
  lprintf("\n\nSelf: fatal error: ");
  va_list ap;
  va_start(ap, msg);
  vlprintf(msg, ap);
  va_end(ap);
  lprintf("\n");
  PrintVMMessages = saved;
  breakpoint();
  OS::terminate(1);
}
开发者ID:AaronNGray,项目名称:self,代码行数:14,代码来源:lprintf.cpp

示例3: guard

void NullDevice::acquireChannel(ChannelBase *chan)
{
    MutexGuard guard(_channelLock);
    if(!guard)
        breakpoint();

    for(unsigned int i = 0; i < _numChannels; ++i)
        if(_channels[i] == chan)
        {
            _channels[i]->x_acquired = false;
            _channels[i] = NULL;
            break;
        }
}
开发者ID:fgenesis,项目名称:tyrsound,代码行数:14,代码来源:NullDevice.cpp

示例4: main

int main(int argc, char *argv[]) {
	pthread_t t;

	breakpoint();

	var = 42;
	(void)var;

	pthread_create(&t, NULL, thread, NULL);
	pthread_join(t, NULL);

	atomic_puts("EXIT-SUCCESS");
	return 0;
}
开发者ID:danieldc,项目名称:rr,代码行数:14,代码来源:watchpoint.c

示例5: arch_init_irq

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;		
	}
}
开发者ID:qttest1,项目名称:PDK_GoBian,代码行数:50,代码来源:m36_irq.c

示例6: main

int main(int argc, char* argv[]) {
  int dummy, i;

  signal(SIGUSR1, handle_usr1);

  breakpoint();
  /* NO SYSCALLS AFTER HERE!  (Up to the assert.) */
  for (i = 1; !caught_usr1 && i < (1 << 30); ++i) {
    dummy += (dummy + i) % 9735;
  }

  atomic_puts("EXIT-SUCCESS");
  return 0;
}
开发者ID:tromey,项目名称:rr,代码行数:14,代码来源:async_usr1.c

示例7: init_IRQ

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();
}
开发者ID:zipangotes,项目名称:DSL-G624T_GPL_code,代码行数:14,代码来源:irq.c

示例8: main

int main(int argc, char *argv[]) {
	size_t num_bytes = sysconf(_SC_PAGESIZE);
	int fd = open(argv[0], O_RDONLY);
	int* wpage;
	int* rpage;
	int i;

	test_assert(fd >= 0);

	breakpoint();
	wpage = mmap(NULL, num_bytes, PROT_READ | PROT_WRITE,
		     MAP_PRIVATE, fd, 0);

	breakpoint();
	rpage = mmap(NULL, num_bytes, PROT_READ,
		     MAP_PRIVATE, fd, 0);

	test_assert(wpage != (void*)-1 && rpage != (void*)-1
		    && rpage != wpage);

	breakpoint();
	for (i = 0; i < num_bytes / sizeof(int); ++i) {
		int magic;

		test_assert(wpage[i] == rpage[i]);

		magic = rpage[i] * 31 + 3;
		wpage[i] = magic;

		test_assert(rpage[i] != magic && wpage[i] == magic);
		atomic_printf("%d:%d,", rpage[i], wpage[i]);
	}

	atomic_puts("EXIT-SUCCESS");

	return 0;
}
开发者ID:koolhazz,项目名称:rr,代码行数:37,代码来源:mmap_private.c

示例9: main

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;
}
开发者ID:palves,项目名称:gdb-old-releases,代码行数:49,代码来源:watchpoint.c

示例10: assprint

void
assprint(const char *expr, const char *file, int line, const char *fmt, ...)
{
	va_list ap;

	/* I like compiler like output */
	hprintf("%s:%d: ASSERT(%s)\n", file, line, expr);

	va_start(ap, fmt);
	vhprintf(fmt, ap);
	va_end(ap);
	hputs("\n");

	breakpoint();
}
开发者ID:jiamacs,项目名称:rhype,代码行数:15,代码来源:assprint.c

示例11: umain

void
umain(int argc, char **argv)
{
	int i;

	sleep(2);

	cprintf("starting count down: ");
	for (i = 5; i >= 0; i--) {
		cprintf("%d ", i);
		sleep(1);
	}
	cprintf("\n");
	breakpoint();
}
开发者ID:Mic92,项目名称:Determinator,代码行数:15,代码来源:testtime.c

示例12: main

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;
}
开发者ID:3125788,项目名称:android_toolchain_gdb,代码行数:15,代码来源:freebpcmd.c

示例13: verifyFailed

NOINLINE_DECL void verifyFailed(const char* expr, const char* file, unsigned line) {
    assertionCount.condrollover(++assertionCount.regular);
    log() << "Assertion failure " << expr << ' ' << file << ' ' << dec << line << endl;
    logContext();
    stringstream temp;
    temp << "assertion " << file << ":" << line;
    AssertionException e(temp.str(), 0);
    breakpoint();
#if defined(MONGO_CONFIG_DEBUG_BUILD)
    // this is so we notice in buildbot
    log() << "\n\n***aborting after verify() failure as this is a debug/test build\n\n" << endl;
    quickExit(EXIT_ABRUPT);
#endif
    throw e;
}
开发者ID:Andiry,项目名称:mongo,代码行数:15,代码来源:assert_util.cpp

示例14: debug_gdb

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
}
开发者ID:ekorenevsky,项目名称:bitvisor,代码行数:15,代码来源:debug.c

示例15: verifyFailed

    NOINLINE_DECL void verifyFailed(const char *msg, const char *file, unsigned line) {
        assertionCount.condrollover( ++assertionCount.regular );
        log() << "Assertion failure " << msg << ' ' << file << ' ' << dec << line << endl;
        logContext();
        stringstream temp;
        temp << "assertion " << file << ":" << line;
        AssertionException e(temp.str(),0);
        breakpoint();
#if defined(_DEBUG) || defined(_DURABLEDEFAULTON) || defined(_DURABLEDEFAULTOFF)
        // this is so we notice in buildbot
        log() << "\n\n***aborting after verify() failure as this is a debug/test build\n\n" << endl;
        abort();
#endif
        throw e;
    }
开发者ID:DeathBorn,项目名称:mongo,代码行数:15,代码来源:assert_util.cpp


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