[CF-Devel] gdb tracing of attack_mode bug:

Peter Mardahl peterm at tesla.EECS.Berkeley.EDU
Fri Nov 24 13:07:21 CST 2000


(gdb) p **hitter
$2 = {contr = 0x0, next = 0x830fea0, prev = 0x8b60a08,
  active_next = 0xbfbff57c, active_prev = 0x89f5308, below = 0x893ac78,
  above = 0x893a798, inv = 0x8c50020, container = 0x0, env = 0x0,
  more = 0x8b60a08, head = 0x0, map = 0x897e000, count = 286142,
  refcount = 1176, sk_list = 0x0, name = 0x820314a "electric dragon",
  title = 0x815d3aa "Ruggilli", race = 0x815edca "dragon", slaying = 0x0,
  msg = 0x0, x = 10, y = 2, ox = 10, oy = 2, speed = -0.400000006,
  speed_left = -0.909989595, nrof = 0, face = 0x8153bc4, direction = 8 '\b',
  facing = 0 '\000', type = 0 '\000', immune = 16440, protected = 0,
  attacktype = 0, vulnerable = 4, path_attuned = 0, path_repelled = 0,
  path_denied = 0, material = 0, magic = 0 '\000', thrownthaco = 0 '\000',
  state = 3 '\003', value = 0, level = 18, last_heal = 25, last_sp = 120,
  last_grace = 0, last_eat = 0, invisible = 0, armour = 0 '\000',
  pick_up = 0 '\000', owner = 0x0, enemy = 0x0, arch = 0x8206000,
  other_arch = 0x0, weight = 200000, carrying = 98090, flags = {2115841,
    1048576, 0, 0}, ownercount = 0, randomitems = 0x82b8a50, run_away = 3,
  chosen_skill = 0x0, exp_obj = 0x0, hide = 0, lights = 0x0, glow_radius = 0,
  move_status = 0, move_type = 0, weight_limit = 0, can_apply = 0 '\000',
  will_apply = 0 '\000', animation_id = 145, anim_speed = 0 '\000',
  last_anim = 28 '\034', stats = {Str = 0 '\000', Dex = 0 '\000',
    Con = 11 '\013', Wis = 20 '\024', Cha = 0 '\000', Int = 0 '\000',
    Pow = 32 ' ', wc = -20 'ì', ac = -12 'ô', hp = 3472, maxhp = 3500,
    sp = 17, maxsp = 100, grace = 0, maxgrace = 0, exp = 70000, food = 0,
    dam = 25, luck = 0 '\000'}, spellitem = 0x8be0020, expmul = 1}

gdb) p *hitter->flags
$5 = 2115841
(gdb) p *hitter->flags & 1
$6 = 1
(gdb) p *hitter->flags & 2
$7 = 0
(gdb) p *hitter->flags & 4
$8 = 0
(gdb) p *hitter->flags & 8
$9 = 0
gdb) p *hitter->map
$10 = {next = 0x0, where = 0x0, 
  path = "/brittany/Brest/Castle/LargeRoom", '\000' <repeats 4063 times>, 
  tmpname = 0x0, reset_time = 975098943, timeout = 0, need_refresh = 0, 
  players = 1, in_memory = 1, encounter = 0, compressed = 0 '\000', 
  map = 0x89b9000, floor = 0x8a7b000, floor2 = 0x8a7f000, map_ob = 0x8985000, 
  difficulty = 12, pending = 0x0, do_los = 1, darkness = 0 '\000', 
  light = 0x8970170, map_object = 0x89c27e8, buttons = 0x82f3190}
(gdb) p *target->flags & 1
$13 = 0
(gdb) p *target->flags & 2
$14 = 0
(gdb) p *target->flags & 4
$15 = 4
$16 = {contr = 0x0, next = 0x89df5f0, prev = 0x8c16688, active_next = 0x0, 
  active_prev = 0x0, below = 0x0, above = 0x0, inv = 0x0, container = 0x0, 
  env = 0x0, more = 0x0, head = 0x0, map = 0x897e000, count = 0, refcount = 0, 
  sk_list = 0x0, name = 0x0, title = 0x0, race = 0x0, slaying = 0x0, 
  msg = 0x0, x = 9, y = 2, ox = 9, oy = 2, speed = 0, 
  speed_left = -0.100000024, nrof = 0, face = 0x8154050, direction = 0 '\000', 
  facing = 0 '\000', type = 88 'X', immune = 0, protected = 0, 
  attacktype = 16384, vulnerable = 0, path_attuned = 0, path_repelled = 0, 
  path_denied = 0, material = 0, magic = 0 '\000', thrownthaco = 0 '\000', 
  state = 1 '\001', value = 0, level = 18, last_heal = 0, last_sp = 0, 
  last_grace = 0, last_eat = 0, invisible = 0, armour = 0 '\000', 
  pick_up = 0 '\000', owner = 0x8b60a08, enemy = 0x0, arch = 0x81d8800, 
  other_arch = 0x0, weight = 0, carrying = 0, flags = {67119884, 0, 0, 0}, 
  ownercount = 286143, randomitems = 0x0, run_away = 0, chosen_skill = 0x0, 
  exp_obj = 0x0, hide = 0, lights = 0x0, glow_radius = 0, move_status = 0, 
  move_type = 0, weight_limit = 0, can_apply = 0 '\000', 
  will_apply = 0 '\000', animation_id = 333, anim_speed = 0 '\000', 
  last_anim = 5 '\005', stats = {Str = 0 '\000', Dex = 0 '\000', 
    Con = 0 '\000', Wis = 0 '\000', Cha = 0 '\000', Int = 0 '\000', 
    Pow = 0 '\000', wc = -30 'â', ac = 0 '\000', hp = -2, maxhp = -4905, 
    sp = 8, maxsp = 0, grace = 0, maxgrace = 0, exp = 0, food = 1, dam = 5, 
    luck = 0 '\000'}, spellitem = 0x0, expmul = 1}


Hope this is useful to someone.

PeterM


    
    


More information about the crossfire mailing list