使用 ProbeVue 调试 C++ 应用程序
2010-05-04 00:00:00 来源:WEB开发网清单 3 中的 Vue 脚本执行以下功能:
探查 space 类的 func1 函数。
探查 space 类的 func2 函数。
探查非类函数 func3。
探查函数 main。
清单 3. Vue 脚本:class.e
# Asking ProbeVue to put probe at func1 of class space
@@uftxlc++:$__CPID:*:"space::func1":entry
{
# And take this action once the function func1 is called
printf("Function : func1 called\n");
}
#Asking ProbeVue to put probe on func2 of class space
@@uftxlc++:$__CPID:*:"space::func2":entry
{
# And take this action once the function func2 is called
printf("Function : func2 called\n");
}
#Asking ProbeVue to put probe on func3
@@uftxlc++:$__CPID:*:"func3":entry
{
# And take this action once the function func3 is called
printf("Function : func3 called\n");
}
#Asking ProbeVue to put probe on main function as well
@@uft:$__CPID:*:main:entry
{
# And take this action once the function main is called
printf("Function : main called\n ");
}
#To terminate ProbeVue session once the executable exits we do the following
#Asking ProbeVue to put probe on exit system call of the process
@@syscall:$__CPID:exit:entry
{
# And exit once the exit system call is called
printf("Process called exit system call\n");
printf("Process exiting hence, Probevue also exiting\n");
exit();
}
Output:
# probevue -X ./class ./class.e
In space public func1 <-- Following this the output is from executable
In space private func2
Return value of space private func2: 1
In func3
Function : main called <-- Following this the output is from Probevue
Function : func1 called
Function : func2 called
Function : func3 called
Process called exit system call
Process exiting hence, Probevue also exiting
- ››使用脚本恢复WinXP系统的用户登录密码
- ››使用phpMyadmin创建数据库及独立数据库帐号
- ››使用Zend Framework框架中的Zend_Mail模块发送邮件...
- ››使用cout标准输出如何控制小数点后位数
- ››使用nofollow标签做SEO的技巧
- ››使用 WebSphere Message Broker 的 WebSphere Tra...
- ››使用SQL Server事件探查器做应用程序的性能分析
- ››使用SQL Server事件探查器分析死锁原因
- ››使用纯文本文件打造WCF服务
- ››使用 Dojo 开发定制 Business Space 小部件,第 4...
- ››使用 ADDRESS 与 INDIRECT函数查询信息
- ››使用 COLUMN函数编制单元信息
赞助商链接