Using gdb

From: Doru-Catalin Togea (doru-cat_at_ifi.uio.no)
Date: 08/26/04


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.               >>
        <<<< ================================== >>>>


Relevant Pages

  • Re: Using gdb
    ... > or UDP to send data from the server to the client. ... Usually if crash has happened inside libc or some other "standart" ... Also do search on google for "memory debugging". ...
    (comp.os.linux.development.apps)
  • RE: IP addresses and VPN
    ... UDP on all machines in the network or just the servers at each end of the VPN ... > Browser receives server announcements from another computer, ... > Microsoft CSS Online Newsgroup Support ... > This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • Cancel IO problems on Server 2003
    ... I have an old monolithic driver that works OK on NT 4.0 and Win 2000 ... I have included a crash dump. ... An API library ... This all works OK on NT 4.0, Win2k and also 2003 Server. ...
    (microsoft.public.development.device.drivers)
  • Re: mount.nfs internal error
    ... Whenever I try to mount from a server on my LAN, ... Adding a -o udp to the mount still fails ... Linux does not yet support nfs over IPv6, although rpcbind does support IPv6 queries.) ... 100000 4 tcp 111 portmapper ...
    (comp.os.linux.networking)
  • RE: Exchange backup on SBS2003 crashes server
    ... After the crash, no server resources are available on ... The log created by the backup is completely empty. ... I understand the server usual crashed during ... these libraries. ...
    (microsoft.public.windows.server.sbs)