Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!vixen.cso.uiuc.edu!ux4.cso.uiuc.edu!not-for-mail From: haszlaki@students.uiuc.edu (eric richard haszlakiewicz) Newsgroups: comp.unix.programmer,comp.unix.bsd.bsdi.misc Subject: Re: How to debug C programs Followup-To: comp.unix.programmer,comp.unix.bsd.bsdi.misc Date: 25 Oct 1996 07:26:56 GMT Organization: University of Illinois at Urbana Lines: 18 Message-ID: <54pq40$61@vixen.cso.uiuc.edu> References: <54plmi$rce@hoho.quake.net> NNTP-Posting-Host: ux4.cso.uiuc.edu X-Newsreader: TIN [UNIX 1.3 950824BETA PL0] Xref: euryale.cc.adfa.oz.au comp.unix.programmer:45243 comp.unix.bsd.bsdi.misc:5182 Ian Kettleborough (ian@idk.com) wrote: : C is not new to me, have used it for years in a PC (DOS) : envirmonent. There are great debuggers there when things don't go : quite right. How and what does one use on BSDI to debug a C program : other than a lot of printf's!! : : Any help will be appreciated.. not sure is BSDI come with this (never used BSDI) but you might try gdb. That's the gnu debugger, or dbx which i think is pretty common. You'll need to compile with -g. A few commands in gdb are: list - to view the source. break # - set breakpoint at line #. run - to start your program. And cont - to continue after you've gotten to a breakpoint. Also step - step a line of c source at a time. You can get more help by typing help at the gdb prompt. dbx is similar but the commands are slightly different. eric