Re: gdb output

From: Sammy (samedi@DHC.NET)
Date: 07/15/97

On Tue, 15 Jul 1997, Brooks Ladd wrote:

>         I'm new using GDB, but i pointed it at my core file and did a "bt"
> here is some of what i got:
> #0  0x8076436 in skip_spaces (string=0xbffff59c) at interpreter.c:948
> #1  0x80764e9 in one_argument (argument=0xfc8 <Address 0xfc8 out of
>         bounds>, first_arg=0x80c593c " droid") at interpreter.c:993
> #2  0x8058a98 in do_second_attack (ch=0x8508708,argument=0xfc8
>         <Address 0xfc8 out of bounds>, cmd=0, subcmd=4040)at act.offensive.c:519
> #3  0x80703df in perform_violence () at fight.c:1037
> looked fine
> When it crashed, an immort casted a dam spell on a mob "droid" not sure
> if second attack was initiated by the imm or the droid.
>         Can someone help me decifer this or point me in a direction.  I
> checked this code against some others and the said lines appear correct.

First off, you can find out who was doing the second attack using the
print command, but first you have to go up a few levels in context.  At
the point above, you're in the skip_spaces function context.  THere's no
ch in skip_spaces, so you can't look at it there.  Type "up" to get to
one_argument, then "up" again to get to do_second_attack.  Now you've got
a ch to work with, which will be the character trying to initiate the
second attack.  Type "print *ch" and you'll get some data on who it was.
If it's a player, then "print ch->" will get you their name.

That's all useful to know, but probably irrelevant in this case.  The
important info is that the argument variable being passed to
do_second_attack is bad.  Type "up" one more time to get to
perform_violence and you'll see the line that calls do_second_attack.

I've never seen second attack done in that way but I'm guessing that it
takes a character name as the argument which is gets from the victim data.
Most likely it's your imm trying to second attack an already dead (and
extracted) droid.  Guessing again, I'd say you probably need a check to
make sure the victim still exists right before the do_second_attack call
in perform_violence.


      | Ensure that you have read the CircleMUD Mailing List FAQ: |
      |   |

This archive was generated by hypermail 2b30 : 12/08/00 PST