函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\debugobjects.c Create Date:2022-07-27 07:52:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__debug_object_init

函数原型:static void __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack)

返回类型:void

参数:

类型参数名称
void *addr
struct debug_obj_descr *descr
intonstack
535  bool check_stack = false
540  fill_pool()
542  db等于We use the pfn of the address for the hash. That way we can check* for freed objects simply by checking the affected bucket.
544  raw_spin_lock_irqsave( & lock, flags)
546  obj等于Lookup an object in the hash bucket.
547  如果非obj
548  obj等于Allocate a new object. If the pool is empty, switch off the debugger.* Must be called with interrupts disabled.
549  如果非obj
550  debug_objects_enabled等于0
553  返回
555  check_stack = true
559  :state恒等于ODEBUG_STATE_NONE
560  :state恒等于ODEBUG_STATE_INIT
563  退出
565  :state恒等于ODEBUG_STATE_ACTIVE
566  state等于state
568  debug_print_object(obj, "init")
570  返回
574  debug_print_object(obj, "init")
575  返回
576  默认
577  退出
580  raw_spin_unlock_irqrestore( & lock, flags)
581  如果check_stackdebug_object_is_on_stack(addr, onstack)
调用者
名称描述
debug_object_initdebug_object_init - debug checks when an object is initialized*@addr: address of the object*@descr: pointer to an object specific debug description structure
debug_object_init_on_stackdebug_object_init_on_stack - debug checks when an object on stack is* initialized*@addr: address of the object*@descr: pointer to an object specific debug description structure