debug_info(3)         LPC 系统函数         debug_info(3)

名称
     debug_info() - 显示除错讯息.

语法
     mixed debug_info( int operation, ... );
     mixed debug_info( 0, object ob );
     mixed debug_info( 1, object ob );

描述
     debug_info() 是一个一般目的的函数, 用来抓 MudOS 的错. 所抓到
     的除错资讯是根据第一个参数的值而变的, 而第一个参数后面的则根
     据第一个参数的运作而决定它们的意义.

     debug_info() 需要一个物件 <ob> 当它的第二个参数, 用来印出该物
     件的各种除错讯息, 第一个参数可以是 0, 或者是 1.

	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.

     而下面的程式片段印的却又不一样, 只差在第一个参数不一样:
     	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

请参考
     dump_file_descriptors(3), dump_socket_status(3)

MudOS                Last change: 5 Sep 1994                    2

