Using gdb
From: Doru-Catalin Togea (doru-cat_at_ifi.uio.no)
Date: 08/26/04
- Next message: QNils_O=2E_Sel=E5sdal=22?=: "Re: Using gdb"
- Previous message: Paul Pluzhnikov: "Re: Output of Function Set By signal() Delayed"
- Next in thread: QNils_O=2E_Sel=E5sdal=22?=: "Re: Using gdb"
- Reply: QNils_O=2E_Sel=E5sdal=22?=: "Re: Using gdb"
- Reply: Andrei Voropaev: "Re: Using gdb"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 26 Aug 2004 09:09:25 +0200
Hi!
I have a set of client server programs. I can choose if I want to use TCP
or UDP to send data from the server to the client. The server sends
lots of data, right now I have a datarate of 6.9 Mbits/sec sent in 30
packets/sec. Using TCP seems to work fine, for indefinite periods of time.
Using UDP crashes my program (Segmentation fault) after a few seconds,
roughly after 100 calls to "write" have been made to the UDP socket.
The program dumps core, and when I run "gdb prog core" command it stops at
the line where it crashes. It is usually a line from libc or some other
library. This I have found out by looking at the output of "where" in gdb.
But I wonder what else can I do to debug my program? There seem to be
zillions of commands available in gdb. Is there a good tutorial?
Also how should I procede? Running "gdb prog core" will run the programme
until the crash, but wouldn't it be usefull to somehow stop the programme
right before the crash? The crashes happen in two places, as far as I
know, but not always after the same number of iterations. I could set
break-points before the crash lines, but this would imply a lot of nexting
(and maybe stepping) until the crash occurs.
Any suggestions?
Thanks,
Cataln
--
<<<< ================================== >>>>
<< We are what we repeatedly do. >>
<< Excellence, therefore, is not an act >>
<< but a habit. >>
<<<< ================================== >>>>
- Next message: QNils_O=2E_Sel=E5sdal=22?=: "Re: Using gdb"
- Previous message: Paul Pluzhnikov: "Re: Output of Function Set By signal() Delayed"
- Next in thread: QNils_O=2E_Sel=E5sdal=22?=: "Re: Using gdb"
- Reply: QNils_O=2E_Sel=E5sdal=22?=: "Re: Using gdb"
- Reply: Andrei Voropaev: "Re: Using gdb"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|