Debug info

来自MudWiki

名称

   debug_info() - 显示调试信息

语法

   mixed debug_info( int operation, object ob );

描述

   debug_info() 是一个用来调试驱动的通用工具。调试信息的操作由第一个参数 `operation` 决定,可用参数值为 0、1、2 ;第二个参数 `ob` 为要调试的对象。

示例

> eval return debug_info(0, me)
Result = "O_HEART_BEAT      : TRUE
O_IS_WIZARD       : TRUE
O_ENABLE_COMMANDS : TRUE
O_CLONE           : TRUE
O_VIRTUAL         : FALSE
O_DESTRUCTED      : FALSE
O_ONCE_INTERACTIVE: TRUE
O_RESET_STATE     : FALSE
O_WILL_CLEAN_UP   : FALSE
O_WILL_RESET      : TRUE
O_ZMP             : FALSE
O_GMCP            : FALSE
O_MXP             : FALSE
O_COMPRESS        : TRUE
O_MSP             : FALSE
next_reset  : 1582
total light : 0
time_of_ref : 1151
ref         : 15
name        : '/clone/user/user#1'
next_all    : OBJ(/clone/user/user)
Previous object in object list: OBJ(/adm/daemons/chard)
position in object list:8082
"
> eval return debug_info(1, me)

Result = "program ref's 2 Name /clone/user/user.c program size 4633 function flags table 484 (968) compiler function table 66 (1056) num strings 193 num vars 15 (150) num inherits 7 (112) total size 8936

"
> eval return debug_info(2, me)

Result = "busy: 0 interrupt: 0 override: 0 alias: 0 history: 0 last_input: "eval return debug_info(2,me)" orginal_input: "eval return debug_info(2,me)" direct_command: 0 killer: ({ }) want_kills: ({ }) enemy: ({ }) next_action: (: call_other, "/adm/daemons/race/human.c", "query_action" :) default_object: "/adm/daemons/race/human.c" default_function: "query_action" competitor: 0 path: ({ /* sizeof() == 10 */

   "/cmds/adm/",
   "/cmds/arch/",
   "/cmds/wiz/",
   "/cmds/imm/",
   "/cmds/usr/",
   "/cmds/std/",
   "/cmds/skill/",
   "/cmds/test/",
   "/mudcore/cmds/wizard/",
   "/mudcore/cmds/player/"
 })

enabled: 1 last_applyer_name: 0 last_applyer_id: 0 cond_applyer: 0 conditions: 0 last_damage_from: 0 last_damage_name: 0 defeated_by: 0 defeated_by_who: 0 ghost: 0 dbase: ([ /* sizeof() == 45 */

   "age" : 14,
   "cwd" : "/",
   "birthday" : 1658792274,
   "cwf" : "/mudcore/system/daemons/http/qq_d.c",
   "attitude" : "peaceful",
   "max_jing" : 100,
   "state" : ([ /* sizeof() == 1 */
       "go" : 86,
     ]),
   "last_save" : 1658830696,
   "surname" : "小",
   "gender" : "男性",
   "jing" : 100,
   "purename" : "泥巴",
   "id" : "mudren",
   "limbs" : ({ /* sizeof() == 16 */
       "头部",
       "颈部",
       "胸口",
       "后心",
       "左肩",
       "右肩",
       "左臂",
       "右臂",
       "左手",
       "右手",
       "腰间",
       "小腹",
       "左腿",
       "右腿",
       "左脚",
       "右脚"
     }),
   "channels" : ({ /* sizeof() == 7 */
       "chat",
       "rumor",
       "party",
       "bill",
       "sing",
       "family",
       "rultra"
     }),
   "food" : 300,
   "potential" : 100,
   "eff_jing" : 100,
   "dex" : 20,
   "name" : "小泥巴",
   "mud_age" : 30258,
   "race" : "人类",
   "can_speak" : 1,
   "born" : "扬州人氏",
   "int" : 20,
   "registered" : 1,
   "max_qi" : 100,
   "unit" : "位",
   "eff_qi" : 100,
   "water" : 300,
   "con" : 20,
   "startroom" : "/d/city/kedian",
   "shen_type" : 0,
   "kar" : 8,
   "storage_bag" : 1,
   "title" : "普通百姓",
   "str" : 20,
   "shen" : 0,
   "special_skill" : ([ /* sizeof() == 3 */
       "self" : 1,
       "lucky" : 1,
       "might" : 1,
     ]),
   "env" : ([ /* sizeof() == 4 */
       "no_autoultra" : 1,
       "wimpy" : 60,
       "auto_get" : 1,
       "auto_regenerate" : 1,
     ]),
   "born_family" : "没有",
   "last_read_news" : 1658792274,
   "per" : 14,
   "qi" : 100,
 ])

tmp_dbase: ([ /* sizeof() == 8 */

   "scan_time" : 1658830696,
   "terminal_type" : "TINTIN++",
   "apply" : ([ /* sizeof() == 1 */
       "armor" : 2,
     ]),
   "reply" : "zhou butong",
   "link_ob" : /clone/user/login#0,
   "user_setup" : 1,
   "armor" : ([ /* sizeof() == 2 */
       "cloth" : /clone/cloth/jinduan#2 ("锦缎(jinduan)"),
       "boots" : /clone/cloth/xianlv#3 ("仙履(shoes)"),
     ]),
   "logon_time" : 1658830696,
 ])

default_ob: 0 msg_buffer: ({ }) written: 2 log_in: 0 weight: 42000 encumb: 20 max_encumb: 66000 magic_move: 0 in_temp: 0 my_id: ({ /* sizeof() == 1 */

   "mudren"
 })

skills: 0 learned: 0 skill_map: 0 skill_prepare: 0 wprepare: 0 count: 0 vars: ([ ]) leader: 0 team: 0 next_beat: 1658830714 keep_beat_flag: 0 short_desc: 0 autoload: 0 gmcp_log: ({ /* sizeof() == 1 */

   "Received: Room.Info.Get"
 })

toDoList: ([ ]) solved: ({ }) my_depot: ([ ]) bag: ({ }) admin_flag: 0 user_cracked: 0 net_dead: 0 last_age_set: 1658830703 user_say: 0 user_command: 0 attach_flag: 0 at_time: 0 ban_to: 0 ban_say_msg: "" my_defeater_id: 0 my_killer_id: 0 craze: 0 prison: 0 time_to_leave: 0

"

参考

   dump_file_descriptors(3), socket_status(3)

翻译

   雪风(i@mud.ren)