您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ top_level_interpreter_data函数代码示例

51自学网 2021-06-03 08:55:30
  C++
这篇教程C++ top_level_interpreter_data函数代码示例写得很实用,希望能帮到您。

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

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

示例1: mi_breakpoint_modified

static voidmi_breakpoint_modified (struct breakpoint *b){    struct mi_interp *mi = top_level_interpreter_data ();    struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());    volatile struct gdb_exception e;    if (mi_suppress_notification.breakpoint)        return;    if (b->number <= 0)        return;    target_terminal_ours ();    fprintf_unfiltered (mi->event_channel,                        "breakpoint-modified");    /* We want the output from gdb_breakpoint_query to go to       mi->event_channel.  One approach would be to just call       gdb_breakpoint_query, and then use mi_out_put to send the current       content of mi_outout into mi->event_channel.  However, that will       break if anything is output to mi_uiout prior to calling the       breakpoint_created notifications.  So, we use       ui_out_redirect.  */    ui_out_redirect (mi_uiout, mi->event_channel);    TRY_CATCH (e, RETURN_MASK_ERROR)    gdb_breakpoint_query (mi_uiout, b->number, NULL);    ui_out_redirect (mi_uiout, NULL);    gdb_flush (mi->event_channel);}
开发者ID:mbref,项目名称:gdb-72-microblaze,代码行数:30,


示例2: mi_solib_loaded

static voidmi_solib_loaded (struct so_list *solib){  struct mi_interp *mi = top_level_interpreter_data ();  struct ui_out *uiout = interp_ui_out (top_level_interpreter ());  target_terminal_ours ();  fprintf_unfiltered (mi->event_channel, "library-loaded");  ui_out_redirect (uiout, mi->event_channel);  ui_out_field_string (uiout, "id", solib->so_original_name);  ui_out_field_string (uiout, "target-name", solib->so_original_name);  ui_out_field_string (uiout, "host-name", solib->so_name);  ui_out_field_int (uiout, "symbols-loaded", solib->symbols_loaded);  if (!gdbarch_has_global_solist (target_gdbarch ()))    {      ui_out_field_fmt (uiout, "thread-group", "i%d", current_inferior ()->num);    }  ui_out_redirect (uiout, NULL);  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:25,


示例3: mi_record_changed

static voidmi_record_changed (struct inferior *inferior, int started){  struct mi_interp *mi = top_level_interpreter_data ();  fprintf_unfiltered (mi->event_channel,  "record-%s,thread-group=/"i%d/"",		      started ? "started" : "stopped", inferior->num);  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:10,


示例4: mi_inferior_removed

static voidmi_inferior_removed (struct inferior *inf){  struct mi_interp *mi = top_level_interpreter_data ();  target_terminal_ours ();  fprintf_unfiltered (mi->event_channel,		      "thread-group-removed,id=/"i%d/"",		      inf->num);  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:11,


示例5: mi_new_thread

static voidmi_new_thread (struct thread_info *t){  struct mi_interp *mi = top_level_interpreter_data ();  struct inferior *inf = find_inferior_ptid (t->ptid);  gdb_assert (inf);  fprintf_unfiltered (mi->event_channel, 		      "thread-created,id=/"%d/",group-id=/"i%d/"",		      t->num, inf->num);  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:13,


示例6: mi_tsv_created

static voidmi_tsv_created (const struct trace_state_variable *tsv){  struct mi_interp *mi = top_level_interpreter_data ();  target_terminal_ours ();  fprintf_unfiltered (mi->event_channel, "tsv-created,"		      "name=/"%s/",initial=/"%s/"/n",		      tsv->name, plongest (tsv->initial_value));  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:13,


示例7: mi_tsv_deleted

static voidmi_tsv_deleted (const struct trace_state_variable *tsv){  struct mi_interp *mi = top_level_interpreter_data ();  target_terminal_ours ();  if (tsv != NULL)    fprintf_unfiltered (mi->event_channel, "tsv-deleted,"			"name=/"%s/"/n", tsv->name);  else    fprintf_unfiltered (mi->event_channel, "tsv-deleted/n");  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:15,


示例8: mi_inferior_exit

static voidmi_inferior_exit (struct inferior *inf){  struct mi_interp *mi = top_level_interpreter_data ();  target_terminal_ours ();  if (inf->has_exit_code)    fprintf_unfiltered (mi->event_channel,			"thread-group-exited,id=/"i%d/",exit-code=/"%s/"",			inf->num, int_string (inf->exit_code, 8, 0, 0, 1));  else    fprintf_unfiltered (mi->event_channel,			"thread-group-exited,id=/"i%d/"", inf->num);  gdb_flush (mi->event_channel);  }
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:16,


示例9: mi_thread_exit

static voidmi_thread_exit (struct thread_info *t, int silent){    struct mi_interp *mi;    struct inferior *inf;    if (silent)        return;    inf = find_inferior_pid (ptid_get_pid (t->ptid));    mi = top_level_interpreter_data ();    target_terminal_ours ();    fprintf_unfiltered (mi->event_channel,                        "thread-exited,id=/"%d/",group-id=/"i%d/"",                        t->num, inf->num);    gdb_flush (mi->event_channel);}
开发者ID:mbref,项目名称:gdb-72-microblaze,代码行数:18,


示例10: mi_breakpoint_deleted

static voidmi_breakpoint_deleted (struct breakpoint *b){  struct mi_interp *mi = top_level_interpreter_data ();  if (mi_suppress_notification.breakpoint)    return;  if (b->number <= 0)    return;  target_terminal_ours ();  fprintf_unfiltered (mi->event_channel, "breakpoint-deleted,id=/"%d/"",		      b->number);  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:18,


示例11: mi_traceframe_changed

static voidmi_traceframe_changed (int tfnum, int tpnum){  struct mi_interp *mi = top_level_interpreter_data ();  if (mi_suppress_notification.traceframe)    return;  target_terminal_ours ();  if (tfnum >= 0)    fprintf_unfiltered (mi->event_channel, "traceframe-changed,"			"num=/"%d/",tracepoint=/"%d/"/n",			tfnum, tpnum);  else    fprintf_unfiltered (mi->event_channel, "traceframe-changed,end");  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:19,


示例12: mi_solib_unloaded

static voidmi_solib_unloaded (struct so_list *solib){    struct mi_interp *mi = top_level_interpreter_data ();    target_terminal_ours ();    if (gdbarch_has_global_solist (target_gdbarch ()))        fprintf_unfiltered (mi->event_channel,                            "library-unloaded,id=/"%s/",target-name=/"%s/","                            "host-name=/"%s/"",                            solib->so_original_name, solib->so_original_name,                            solib->so_name);    else        fprintf_unfiltered (mi->event_channel,                            "library-unloaded,id=/"%s/",target-name=/"%s/","                            "host-name=/"%s/",thread-group=/"i%d/"",                            solib->so_original_name, solib->so_original_name,                            solib->so_name, current_inferior ()->num);    gdb_flush (mi->event_channel);}
开发者ID:mbref,项目名称:gdb-72-microblaze,代码行数:21,


示例13: mi_thread_exit

static voidmi_thread_exit (struct thread_info *t, int silent){  struct mi_interp *mi;  struct inferior *inf;  struct cleanup *old_chain;  if (silent)    return;  inf = find_inferior_ptid (t->ptid);  mi = top_level_interpreter_data ();  old_chain = make_cleanup_restore_target_terminal ();  target_terminal_ours ();  fprintf_unfiltered (mi->event_channel, 		      "thread-exited,id=/"%d/",group-id=/"i%d/"",		      t->num, inf->num);  gdb_flush (mi->event_channel);  do_cleanups (old_chain);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:22,


示例14: mi_memory_changed

static voidmi_memory_changed (struct inferior *inferior, CORE_ADDR memaddr,		   ssize_t len, const bfd_byte *myaddr){  struct mi_interp *mi = top_level_interpreter_data ();  struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());  struct obj_section *sec;  if (mi_suppress_notification.memory)    return;  target_terminal_ours ();  fprintf_unfiltered (mi->event_channel,		      "memory-changed");  ui_out_redirect (mi_uiout, mi->event_channel);  ui_out_field_fmt (mi_uiout, "thread-group", "i%d", inferior->num);  ui_out_field_core_addr (mi_uiout, "addr", target_gdbarch (), memaddr);  ui_out_field_fmt (mi_uiout, "len", "%s", hex_string (len));  /* Append 'type=code' into notification if MEMADDR falls in the range of     sections contain code.  */  sec = find_pc_section (memaddr);  if (sec != NULL && sec->objfile != NULL)    {      flagword flags = bfd_get_section_flags (sec->objfile->obfd,					      sec->the_bfd_section);      if (flags & SEC_CODE)	ui_out_field_string (mi_uiout, "type", "code");    }  ui_out_redirect (mi_uiout, NULL);  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:38,


示例15: mi_tsv_modified

static voidmi_tsv_modified (const struct trace_state_variable *tsv){  struct mi_interp *mi = top_level_interpreter_data ();  struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());  target_terminal_ours ();  fprintf_unfiltered (mi->event_channel,		      "tsv-modified");  ui_out_redirect (mi_uiout, mi->event_channel);  ui_out_field_string (mi_uiout, "name", tsv->name);  ui_out_field_string (mi_uiout, "initial",		       plongest (tsv->initial_value));  if (tsv->value_known)    ui_out_field_string (mi_uiout, "current", plongest (tsv->value));  ui_out_redirect (mi_uiout, NULL);  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:23,


示例16: mi_command_param_changed

static voidmi_command_param_changed (const char *param, const char *value){  struct mi_interp *mi = top_level_interpreter_data ();  struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());  if (mi_suppress_notification.cmd_param_changed)    return;  target_terminal_ours ();  fprintf_unfiltered (mi->event_channel,		      "cmd-param-changed");  ui_out_redirect (mi_uiout, mi->event_channel);  ui_out_field_string (mi_uiout, "param", param);  ui_out_field_string (mi_uiout, "value", value);  ui_out_redirect (mi_uiout, NULL);  gdb_flush (mi->event_channel);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:23,


示例17: mi_on_normal_stop

static voidmi_on_normal_stop (struct bpstats *bs, int print_frame){  /* Since this can be called when CLI command is executing,     using cli interpreter, be sure to use MI uiout for output,     not the current one.  */  struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());  if (print_frame)    {      struct thread_info *tp;      int core;      tp = inferior_thread ();      if (tp->thread_fsm != NULL	  && thread_fsm_finished_p (tp->thread_fsm))	{	  enum async_reply_reason reason;	  reason = thread_fsm_async_reply_reason (tp->thread_fsm);	  ui_out_field_string (mi_uiout, "reason",			       async_reason_lookup (reason));	}      print_stop_event (mi_uiout);      /* Breakpoint hits should always be mirrored to the console.	 Deciding what to mirror to the console wrt to breakpoints and	 random stops gets messy real fast.  E.g., say "s" trips on a	 breakpoint.  We'd clearly want to mirror the event to the	 console in this case.  But what about more complicated cases	 like "s&; thread n; s&", and one of those steps spawning a	 new thread, and that thread hitting a breakpoint?  It's	 impossible in general to track whether the thread had any	 relation to the commands that had been executed.  So we just	 simplify and always mirror breakpoints and random events to	 the console.	 OTOH, we should print the source line to the console when	 stepping or other similar commands, iff the step was started	 by a console command, but not if it was started with	 -exec-step or similar.  */      if ((bpstat_what (tp->control.stop_bpstat).main_action	   == BPSTAT_WHAT_STOP_NOISY)	  || !(tp->thread_fsm != NULL	       && thread_fsm_finished_p (tp->thread_fsm))	  || (tp->control.command_interp != NULL	      && tp->control.command_interp != top_level_interpreter ()))	{	  struct mi_interp *mi	    = (struct mi_interp *) top_level_interpreter_data ();	  print_stop_event (mi->cli_uiout);	}      ui_out_field_int (mi_uiout, "thread-id",			pid_to_thread_id (inferior_ptid));      if (non_stop)	{	  struct cleanup *back_to = make_cleanup_ui_out_list_begin_end 	    (mi_uiout, "stopped-threads");	  ui_out_field_int (mi_uiout, NULL,			    pid_to_thread_id (inferior_ptid));	  do_cleanups (back_to);	}      else	ui_out_field_string (mi_uiout, "stopped-threads", "all");      core = target_core_of_thread (inferior_ptid);      if (core != -1)	ui_out_field_int (mi_uiout, "core", core);    }    fputs_unfiltered ("*stopped", raw_stdout);  mi_out_put (mi_uiout, raw_stdout);  mi_out_rewind (mi_uiout);  mi_print_timing_maybe ();  fputs_unfiltered ("/n", raw_stdout);  gdb_flush (raw_stdout);}
开发者ID:heiher,项目名称:binutils-mips,代码行数:81,


示例18: mi_on_normal_stop

static voidmi_on_normal_stop (struct bpstats *bs, int print_frame){  /* Since this can be called when CLI command is executing,     using cli interpreter, be sure to use MI uiout for output,     not the current one.  */  struct ui_out *mi_uiout = interp_ui_out (top_level_interpreter ());  if (print_frame)    {      int core;      if (current_uiout != mi_uiout)	{	  /* The normal_stop function has printed frame information	     into CLI uiout, or some other non-MI uiout.  There's no	     way we can extract proper fields from random uiout	     object, so we print the frame again.  In practice, this	     can only happen when running a CLI command in MI.  */	  struct ui_out *saved_uiout = current_uiout;	  struct target_waitstatus last;	  ptid_t last_ptid;	  current_uiout = mi_uiout;	  get_last_target_status (&last_ptid, &last);	  print_stop_event (&last);	  current_uiout = saved_uiout;	}      /* Otherwise, frame information has already been printed by	 normal_stop.  */      else	{	  /* Breakpoint hits should always be mirrored to the console.	     Deciding what to mirror to the console wrt to breakpoints	     and random stops gets messy real fast.  E.g., say "s"	     trips on a breakpoint.  We'd clearly want to mirror the	     event to the console in this case.  But what about more	     complicated cases like "s&; thread n; s&", and one of	     those steps spawning a new thread, and that thread	     hitting a breakpoint?  It's impossible in general to	     track whether the thread had any relation to the commands	     that had been executed.  So we just simplify and always	     mirror breakpoints and random events to the console.	     Also, CLI execution commands (-interpreter-exec console	     "next", for example) in async mode have the opposite	     issue as described in the "then" branch above --	     normal_stop has already printed frame information to MI	     uiout, but nothing has printed the same information to	     the CLI channel.  We should print the source line to the	     console when stepping or other similar commands, iff the	     step was started by a console command (but not if it was	     started with -exec-step or similar).  */	  struct thread_info *tp = inferior_thread ();	  if ((!tp->control.stop_step		  && !tp->control.proceed_to_finish)	      || (tp->control.command_interp != NULL		  && tp->control.command_interp != top_level_interpreter ()))	    {	      struct mi_interp *mi = top_level_interpreter_data ();	      struct target_waitstatus last;	      ptid_t last_ptid;	      struct cleanup *old_chain;	      /* Set the current uiout to CLI uiout temporarily.  */	      old_chain = make_cleanup (restore_current_uiout_cleanup,					current_uiout);	      current_uiout = mi->cli_uiout;	      get_last_target_status (&last_ptid, &last);	      print_stop_event (&last);	      do_cleanups (old_chain);	    }	}      ui_out_field_int (mi_uiout, "thread-id",			pid_to_thread_id (inferior_ptid));      if (non_stop)	{	  struct cleanup *back_to = make_cleanup_ui_out_list_begin_end 	    (mi_uiout, "stopped-threads");	  ui_out_field_int (mi_uiout, NULL,			    pid_to_thread_id (inferior_ptid));	  do_cleanups (back_to);	}      else	ui_out_field_string (mi_uiout, "stopped-threads", "all");      core = target_core_of_thread (inferior_ptid);      if (core != -1)	ui_out_field_int (mi_uiout, "core", core);    }    fputs_unfiltered ("*stopped", raw_stdout);  mi_out_put (mi_uiout, raw_stdout);//.........这里部分代码省略.........
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:101,



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


C++ topfile函数代码示例
C++ topLevelWidget函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。