From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,f2a96e8c61f621a1 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-09-11 02:40:42 PST Message-ID: <3B9DDC17.B4331D58@sql.de> Date: Tue, 11 Sep 2001 11:40:39 +0200 From: Joerg Bruehe Organization: SQL Datenbanksysteme GmbH X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Re: Segmentation fault (core dumped) References: <3B9DAFD3.714AC82C@ilt.fhg.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: server1.software-ag.de X-Trace: 11 Sep 2001 11:40:39 CET, server1.software-ag.de X-Complaints-To: usenet@ivm.net X-Admin-Comment: X-NNTP-Posting... are valid if present Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.174.75.178!news-fra1.dfn.de!gatel-ffm!newspush.frankfurt1.eu.level3.net!level3eu!news-in.ivm.net!news.ivm.net!server1.software-ag.de Xref: archiver1.google.com comp.unix.tru64:4820 Hi Rolf, Rolf Wester wrote: > > Hi, > > I have a question concerning core dumps. I have a program written in c++ > (compiler is cxx) that makes a segmentation fault with subsequent core > dump. This happens some time after program start, so debugging would be > quite tedious. Is it possible to get information about the source line > where the segmentation fault happens from the core dump? typically: Yes. "Debugging" does not necessarily mean "tracing" or "single-stepping". You should start by getting a stack backtrace from the core dump, the command is specific to the debugger you use: "adb" -> '$c', "dbx"/"gdb" -> 'where', "sdb" -> 't'. This should give you a function name, where the segmentation fault (= use of an invalid address via a pointer) occurred. If that info is insufficient, add a "debug" option ('-g' ?) and recompile the program. When degugging the new core, you should also see line numbers. Regards, Joerg Bruehe -- Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany (speaking only for himself) mailto: joerg@sql.de