debug_info(3) MudOS v21c2
(5 Sep 1994)
名稱:
debug_info() - 顯示除錯 (debug) 資訊
語法:
mixed debug_info( int operation, ... );
mixed debug_info( 0, object ob );
mixed debug_info( 1, object ob );
混合 debug_info( 整數 operation, ... );
混合 debug_info( 0, 物件 ob );
混合 debug_info( 1, 物件 ob );
用法:
debug_info() 是一個普通用途的措施, 用來為 MudOS 驅動程式除錯.
而所需要的除錯資訊則由第一個參數決定. 其餘的參數則由第一個參數的動作 (operation)
決定.
存在的動作 (0 與 1) 需要第二個物件參數, 而可能用來顯示 MudOS 物件結構的不同範圍
( various fields of the MudOS object structure).
以下的 LPC 碼用來產生一個簡單的輸出結果:
程式一:
/* di0.c */
create() {
debug_info(0, this_object());
}
結果一:
O_HEART_BEAT : FALSE
O_IS_WIZARD : FALSE
O_ENABLE_COMMANDS : FALSE
O_CLONE : FALSE
O_DESTRUCTED : FALSE
O_SWAPPED : FALSE
O_ONCE_INTERACTIVE: FALSE
O_RESET_STATE : FALSE
O_WILL_CLEAN_UP : FALSE
O_WILL_RESET: TRUE
total light : 0
next_reset : 720300560
time_of_ref : 720299416
ref : 2
swap_num : -1
name : 'u/c/cynosure/di0'
next_all : OBJ(bin/dev/_update)
This object is the head of the object list.
程式二:
/* di1.c */
create() {
debug_info(1, this_object());
}
結果二:
program ref's 1
Name u/c/cynosure/di1.c
program size 10
num func's 1 (16)
num strings 0
num vars 0 (0)
num inherits 0 (0)
total size 104
參考:
翻譯:
Spock @ FF 97.Jan.27. (printed 3/16/95)
回到上一頁