Re: ASCII Pfiles

From: Peter Ajamian (peter@pajamian.dhs.org)
Date: 02/19/00


Daniel Staudt wrote:
>
> um no it is not the 0's
> the 0's are place holders for the options
> where it is <id> <name> <last-login> <prefs> <prefs2> or something like that
>
> -----
> #0  0x4009cc6a in chunk_alloc (ar_ptr=0x4012d580, nb=16) at malloc.c:2673
> #1  0x4009e294 in __libc_calloc (n=1, elem_size=12) at malloc.c:3574
> #2  0x806f169 in write_to_q (txt=0xbffff83c "iaznab", queue=0x82e0a68,
>     aliased=0) at comm.c:1028
> ----
> there is something wrong in the write_to_q function. some where it allocates
> invalid memory or something try looking at comm.c:line 1028

Unless you actually made changes to write_to_q, I highly doubt that
that's where your problem is originating.  It's far more likely that
it's originating in one of the frames further down on the backtrace.  At
any rate, what you want to do is switch to the appropriate frame in GDB
(start with #2 even though I doubt the problem is there) look at the
indicated line in the source and print all the variables that are
referenced in any maner on or around that line.  Look for a ptr with an
address of 0x0 or a variable that gives some kind of error when you try
to print it, something like "Cannot access memory at blah blah".  When
you find the variable, look back through the code up to that point and
try to determine where it is getting set incorrectly or overwritten, or
freed, etc.  Also, learn how to use GDB, it is a very powerfull tool and
will help you immensley if you learn how to read and understand the
information it's giving you and how to extract the info you need.

Regards, Peter


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT