OSEck系统中的各种hook函数
来源:互联网 发布:dotamax看不到数据 编辑:程序博客网 时间:2024/06/03 20:51
There are several possibilities for debugging an OSEck System. For low-level debugging the sysinfo system calls can be utilized for writing debug hooks and error handlers, performing traces, memory profiling, and crash analysis.
hook是一段应用程序,将该应用程序注册到系统,使该应用程序可以在系统级访问在正常情况下无法访问的一些资源,处理一些消息等。hook是debug系统的一种手段。
OSEck guide中对hook的定义:
It is sometimes desirable to write customized routines to change the behavior of, or add functionality to, some of the OSE system calls. This is realized through a number of pre-defined system events (which often but not always map 1:1 to a single system call) for which user defined handlers, so called hooks, can be configured, as described in the OSEck Kernel Reference Manual. Any number of hook functions can be configured for each event, and will be called in the order that they are entered in the configuration file. Hooks exist mainly for debugging and logging purposes,and are not portable from one CPU, or kernel, to another.
OSEck支持应用应用注册以下hook:
alloc_hook,create_pool_hook,create_process_hook,error_hook,debug_hook,kill_pool_hook,kill_proc_hook,receive_hook,reset_pool_hook,restore_hook,send_hook,swap_hook
上述hook将会注册到OSEck的系统级全局变量odo_config(CPU级别的)中,进而提供给系统。
例如,较为常用的swap_hook, 它会在进程切换时被调用,我们可以记录一些进程切换信息,如from,to的进程ID,以及timestamp。这样我们就可以知道不同的进程的切换背景以及进程的执行时间。如果某个进程陷入死循环的话,记录下的该进程的执行时间会很长,这样就有助于我们调查问题了。
- OSEck系统中的各种hook函数
- OSEck中的其他进程
- hook系统函数
- Delphi中的钩子函数HOOK详解
- SSDT HOOK中的获取函数服务号
- HOOK函数
- R中的各种apply函数
- opencv中的各种滤波函数
- opencv中的各种滤波函数
- 神经网络中的各种激活函数
- 基于OSEck系统的TI C66x DSP进程间的三种通信机制
- android对java函数的hook,替换系统变量
- (转载)利用内核级通用Hook检测系统中的进程
- 替换 IAT 中的导入函数地址实现 Hook API
- ACE_OS中的系统函数
- 工作流系统中的各种流转过程
- windows系统日志中的各种登录类型
- windows系统command中的各种命令
- LAMP环境配置与优化
- Android手游《斗地主》完整源码(支持单机和网络对战)
- 剑指offer 36 - 数组中的逆序对
- iOS开发:设计模式那点事
- 遍历JSON、获取JSON长度的方法
- OSEck系统中的各种hook函数
- eclipse中tomcat不能使用debug模式修改java文件
- 字符串的操作
- 卓创和信致力于城市绿道,环保绿道,绿道设计,绿道规划,园林绿道,景观绿道等设计
- String 常用方法最优算法实现总结 (一)
- gradle 混淆出错
- SAT要求多少词汇量?
- ElasticSearch NEST
- SpringMVC整合Quartz实现定时任务---简单的例子