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

C++ breakpoint函数代码示例

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

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



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


示例16: main

int main(int argc, char* argv[]) {
  test_assert(argc == 1 || (argc == 2 && !strcmp("self", argv[1])));

  if (argc != 2) {
    atomic_printf("exec(%s, 'self') ...\n", argv[0]);

    breakpoint();
    /* No syscalls in between here. */
    execlp(argv[0], argv[0], "self", NULL);
    test_assert("Not reached" && 0);
  }

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


示例17: print_queue

void print_queue(unsigned int max) {
	kassert(max < MAX_PID);
	int i;
	for (i = 0; i < max; i++) {
		vga_printf("index %u\n", i);
		vga_printf("\tpd = %d\n", tasks[i].pd);
		vga_printf("\tquantum = %u\n", tasks[i].quantum);
		if (tasks[i].prev != NULL) {
			vga_printf("\tprev_pid = %d\n", tasks[i].prev->pd);
		} else {
			vga_printf("\tprev_pid = NULL\n");
		}
		if (tasks[i].next != NULL) {
			vga_printf("\tnext_pid = %d\n", tasks[i].next->pd);
		} else {
			vga_printf("\tnext_pid = NULL\n");
		}
		breakpoint();
	}
	if (actual != NULL) {
		vga_printf("actual_pid = %d\t", actual->pd);
	} else {
		vga_printf("actual_pid = NULL\t");
	}
	if (first != NULL) {
		vga_printf("first_pid = %d\t", first->pd);
	} else {
		vga_printf("first_pid = NULL\t");
	}
	if (last != NULL) {
		vga_printf("last_pid = %d\n", last->pd);
	} else {
		vga_printf("last_pid = NULL\n");
	}
	breakpoint();
}
开发者ID:munshkr,项目名称:spuriOS,代码行数:36,代码来源:sched.c


示例18: VG_

Bool VG_(gdbserver_point) (PointKind kind, Bool insert,
                           CORE_ADDR addr, int len)
{
   Bool res;
   GS_Watch *g;
   Bool is_code = kind == software_breakpoint || kind == hardware_breakpoint;

   dlog(1, "%s %s at addr %p %s\n",
        (insert ? "insert" : "remove"), 
        VG_(ppPointKind) (kind),
        C2v(addr), 
        sym(addr, is_code));

   if (is_code) {
      breakpoint (insert, addr);
      return True;
   }

   vg_assert (kind == access_watchpoint 
              || kind == read_watchpoint 
              || kind == write_watchpoint);

   if (tool_watchpoint == NULL)
      return False;

   res = (*tool_watchpoint) (kind, insert, addr, len);
   if (!res) 
      return False; /* error or unsupported */

   g = VG_(HT_lookup) (gs_watches, (UWord)addr);
   if (insert) {
      if (g == NULL) {
         g = VG_(arena_malloc)(VG_AR_CORE, "gdbserver_point watchpoint",
                               sizeof(GS_Watch));
         g->addr = addr;
         g->len  = len;
         g->kind = kind;
         VG_(HT_add_node)(gs_watches, g);
      } else {
         g->kind = kind;
      }
   } else {
      vg_assert (g != NULL);
      VG_(HT_remove) (gs_watches, g->addr);
      VG_(arena_free) (VG_AR_CORE, g);
   }  
   return True;
}
开发者ID:AmesianX,项目名称:pathgrind,代码行数:48,代码来源:m_gdbserver.c


示例19: main

int main(void) {
  __asm__ __volatile__(
/* Push the constants in stack order so they look as
 * we expect in gdb. */
#if __i386__
      "fldl st7\n\t"
      "fldl st6\n\t"
      "fldl st5\n\t"
      "fldl st4\n\t"
      "fldl st3\n\t"
      "fldl st2\n\t"
      "fldl st1\n\t"
      "fldl st0\n\t"
      "movss xmm0, %xmm0\n\t"
      "movss xmm1, %xmm1\n\t"
      "movss xmm2, %xmm2\n\t"
      "movss xmm3, %xmm3\n\t"
      "movss xmm4, %xmm4\n\t"
      "movss xmm5, %xmm5\n\t"
      "movss xmm6, %xmm6\n\t"
      "movss xmm7, %xmm7\n\t"
#elif __x86_64__
      "fldl st7(%rip)\n\t"
      "fldl st6(%rip)\n\t"
      "fldl st5(%rip)\n\t"
      "fldl st4(%rip)\n\t"
      "fldl st3(%rip)\n\t"
      "fldl st2(%rip)\n\t"
      "fldl st1(%rip)\n\t"
      "fldl st0(%rip)\n\t"
      "movss xmm0(%rip), %xmm0\n\t"
      "movss xmm1(%rip), %xmm1\n\t"
      "movss xmm2(%rip), %xmm2\n\t"
      "movss xmm3(%rip), %xmm3\n\t"
      "movss xmm4(%rip), %xmm4\n\t"
      "movss xmm5(%rip), %xmm5\n\t"
      "movss xmm6(%rip), %xmm6\n\t"
      "movss xmm7(%rip), %xmm7\n\t"
#else
#error unexpected architecture
#endif
      );

  breakpoint();

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


示例20: asserted

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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