From: Peter Ajamian (
Date: 01/27/00

Alex Mann wrote:
> Hi
> Sorry i know i should have known better then that but this problems has just
> really anoyed me, not much stumps me completely like this.

That's okay, I can say with almost ceartainty that everyone on this list
has come across a problem more than once that completely stumped them
(at least for a time).  My best advice for that is to take a deep
breath, relax and follow the advice given to you in the GDB manual (on
the ceramic mouse site) and on this list.

A few things to note, core dumps are not anything to get frustrated
over, a core dump is there to help you find a problem in your code, it
is created for you when your program seg faults.

strcat is a standard library function which has gotten lots of use and
been fuuly debugged a long time ago, it is quite unlikely that the cause
of the problem is in strcat.  You problem is most likely caused by a
buffer being passed to strcat that is not large enough to hold the
contents of both strings.

The reason that GDB shows the seg fault in strcat is because that is
where the problem reared its ugly head, to find out what called strcat
just type bt into gdb and it will show you what function called what
function all the way back to main.  You should be able to see what
called strcat and on what line of what file.

At this point there should be enough information to get you started on
finding the problem, you can refer to the above mentioned documents
(that several others have recommended) for some more very helpfull
commands to use in gdb, and if you still can't figure it out, just take
a deep breath, relax, and post back to the list with all the info you
have collected so far and someone will be ore than happy to help you out
a step further.

Regards, Peter

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

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