1. debug_info(3) LP MudOSv21c7 (7 Jul 1996)
    2. 函数名称:
    3. debug_info() - 显示除错 (debug) 资讯
    4. 函数语法:
    5. mixed debug_info( int operation, ... );
    6. mixed debug_info( 0, object ob );
    7. mixed debug_info( 1, object ob );
    8. 混合 debug_info( 整数 operation, ... );
    9. 混合 debug_info( 0, 物件 ob );
    10. 混合 debug_info( 1, 物件 ob );
    11. 函数用法:
    12. debug_info() 是一个普通用途的措施, 用来为 MudOS
    13. 驱动程式除错. 而所需要的除错资讯则由第一个参数决定.
    14. 其馀的参数则由第一个参数的动作 (operation) 决定.
    15. 存在的动作 (0 1) 需要第二个物件参数, 而可能用来显示
    16. MudOS 物件结构的不同□围 ( various fields of the MudOS
    17. object structure).
    18. 以下的 LPC 码用来产生一个简单的输出结果:
    19. 程式一:
    20. /* di0.c */
    21. create() {
    22. debug_info(0, this_object());
    23. }
    24. 结果一:
    25. O_HEART_BEAT : FALSE
    26. O_IS_WIZARD : FALSE
    27. O_ENABLE_COMMANDS : FALSE
    28. O_CLONE : FALSE
    29. O_DESTRUCTED : FALSE
    30. O_SWAPPED : FALSE
    31. O_ONCE_INTERACTIVE: FALSE
    32. O_RESET_STATE : FALSE
    33. O_WILL_CLEAN_UP : FALSE
    34. O_WILL_RESET: TRUE
    35. total light : 0
    36. next_reset : 720300560
    37. time_of_ref : 720299416
    38. ref : 2
    39. swap_num : -1
    40. name : 'u/c/cynosure/di0'
    41. next_all : OBJ(bin/dev/_update)
    42. This object is the head of the object list.
    43. 程式二:
    44. /* di1.c */
    45. create() {
    46. debug_info(1, this_object());
    47. }
    48. 结果二:
    49. program ref's 1
    50. Name u/c/cynosure/di1.c
    51. program size 10
    52. num func's 1 (16)
    53. num strings 0
    54. num vars 0 (0)
    55. num inherits 0 (0)
    56. total size 104
    57. 参考函数:
    58. dump_file_descriptors(3), dump_socket_status(3)
    59. 手册翻译:
    60. Phoebus@ZH 97.Jan.27. (Writen 5/23/97)