ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with core files.


From: Tim Mooney
Subject: Re: Help with core files.
Date: Tue, 21 Jan 2003 17:34:39 -0600 (CST)

In regard to: Help with core files., Brian Abney said (at 3:10pm on Jan 21,...:

>I want to use DDD to help me capture where my program is causing a
>segmentation fault. However when I run the program using the debugger the
>debugger does not show where the segmentation fault happen. I also tried
>bringing the executable into ddd along with the core file and the core file
>just says 0x0 in ?? (). no call stack to look at or anything. I also used ef
>but I just produced a core file I cant read either. Is there any way I can
>use ddd to determine where my program segmented at? I read your online
>manual and it doesn't say anything how to figure out where I am coring at.

Make sure your program is compiled with debugging information that your
inferior (aka underlying) debugger (probably gdb or dbx) can read.  Then
run your program via ddd

        ddd yourprogramname

Set up any arguments your program name need to get on the command line
(how you do this depends on what underlying debugger you're using), and
then tell your debugger to begin executing your program.

As soon as a segfault happens, ddd and your underlying debugger should
take over, and show you exactly where you were when it happened.

This all depends on having decent debugging information available, though.
You probably get that by using `-g' or some similar option with your
compiler when you compile each of your source files, and you would lose
debugging information if your program is stripped (via strip(1)) before
you run it.

Tim
-- 
Tim Mooney                              address@hidden
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164




reply via email to

[Prev in Thread] Current Thread [Next in Thread]