Re: Re: Re: Crash at startup of DDD for Fortran programs

GUEZ Lionel <[email protected]>
Newsgroups gmane.comp.debugging.ddd.general
Organization LMD
Message-ID <[email protected]>
From: 	Peter Wainwright
Subject: 	Re: Re: Crash at startup of DDD for Fortran programs
Date: 	Thu, 18 Dec 2008 17:08:14 +0000

> A couple of other points I found out:
>
> (1) The problem I had in 2005 had the same symptoms, but it seems it was
> related to a Red Hat (Fedora) patch, not found on upstream GDB.  So,
> unless Mandriva made the same changes, it is probably not the same issue
> and my patch won't help you.
>
> (2) Reading your original message more carefully I understand why when
> you saw the "segmentation fault" message might have concluded that DDD
> had crashed. That was my first thought, too. However, reading the error
> message more carefully you can see it says that "*GDB* terminated
> abnormally (Segmentation fault)".  DDD also issues dialogs if it
> crashes, but they look slightly different:
>
>              DDD: Oops
> Internal error: Segmentation fault (core dumped)
> Restart    Exit    Ignore    Help
>
> In fact DDD is taking the only action it can in the desperate situation
> when its inferior debugger has vanished.
>
> (3) The problem is most likely due to some error in gdb when you use
> "info line xx" to query a symbol which does not exist. I believe that
> DDD is trying to find the source line corresponding to the program entry
> point so it can display it in the source view window. However, each
> language creates a different symbol for the entry point: C programs, as
> we know, call it "main"; Fortran programs call it "MAIN__". Therefore,
> DDD tries a series of different names until it finds one which works.
> For example, if I try it on your program:
>
> address@hidden:tmp$ gdb a.out
> GNU gdb 6.8-debian
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu"...
> (gdb) info line main
> No line number information available for address 0x400860 <main>
> (gdb) info line MAIN__
> Line 1 of "plouf.f" starts at address 0x4007b8 <MAIN__> and ends at
> 0x4007c3 <MAIN__+11>.
>
> It looks like instead of saying "No line number information" your GDB is
> crashing on the underined symbol.
>
> Hope this helps,
>
> Peter

OK. Thank you for all your messages. You have found the problem. The problem 
is with the version 6.3 of GDB. I upgraded to version 6.8 of GDB and now DDD 
works. What was misleading me was that some commands of GDB worked 
fine: "breakpoint", "run", "continue". But, as you pointed out, "info line 
main" crashes GDB 6.3.
Sincerely,
Lionel GUEZ
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.