本文整理汇总了C++中Tracer::detach方法的典型用法代码示例。如果您正苦于以下问题:C++ Tracer::detach方法的具体用法?C++ Tracer::detach怎么用?C++ Tracer::detach使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracer
的用法示例。
在下文中一共展示了Tracer::detach方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
case '8':
case '9':
// convert character option into integer option for recorder mode.
option -= 48;
// close any previously open recorder file.
if (recorder_mode != NOT_RECORDING)
{
fclose(recorder);
if (reg_enum_flag)
fclose(recorder_regs);
}
printf("entering recorder mode %d, register enumeration is %s.\n", option, (reg_enum_flag ? "enabled" : "disabled"));
recorder_mode = option;
// create/open recorder file.
sprintf(filename, "%s.%d", target, option);
recorder = fopen(filename, "a+");
// create/open the register recording file if the register enumeration flag is raised.
if (reg_enum_flag)
{
sprintf(filename, "%s-regs.%d", target, option);
recorder_regs = fopen(filename, "a+");
}
break;
// detach from debuggee.
case 'd':
if (!dbg.pDebugActiveProcessStop || !dbg.pDebugSetProcessKillOnExit)
{
printf("\ndetaching is not possible on the current os ... request ignored.\n");
break;
}
main_terminate = true;
printf("\nclosing any open recorder and detaching ...\n");
if (recorder_mode != NOT_RECORDING)
{
fclose(recorder);
if (reg_enum_flag)
fclose(recorder_regs);
}
dbg.detach();
break;
// display available options.
case 'h':
ps_commands();
break;
// display memory map for executable sections of each module.
case 'm':
dbg.ReBuildMemoryMap();
printf("\n---------- MODULE LIST ----------\n");
for (it = dbg.MemoryMap.begin(); it != dbg.MemoryMap.end(); ++it)
{
// determine the correct section)