[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use ddd with other debuggers
From: |
Andreas Zeller |
Subject: |
Re: How to use ddd with other debuggers |
Date: |
07 Mar 2001 12:44:37 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) |
Hi!
Van Snyder <address@hidden> writes:
> I have the Lahey/Fujitsu Fortran compiler. It comes with a non-gnu
> text-only debugger. It doesn't use the usual Linux format of
> debugger-table information.
>
> Where do I start to learn how to hook this debugger to ddd? I didn't
> see anything in the ddd manual about this (but then, I only read
> the table of contents, and suggestive sections, not the whole manual).
>
> I have the NAG Fortran compiler. It uses the standard Linux format of
> debugger-table information. I can run its programs in gdb and ddd.
> The problem is that NAG puts an underscore on the end of every name in
> the debugger's table. Also, being Fortran, names are case insensitive.
> Also, being Fortran, the structure reference operator in the source
> text is "%", not ".". The NAG compiler produces some extra debugging
> information tables, in addition to the usual Linux ones and in a separate
> file, so that their own brain-dead non-gnu debugger can cope with the
> advanced features of Fortran that have no counterpart in C.
>
> Where do I start to learn how to tune ddd to work with this compiler?
Simple. Convince the compiler vendor to support GDB or vice versa :-)
Seriously: Unfortunately, there is no out-of-the box way to hook a new
debugger into DDD. This always requires a lot of coding, as DDD is
quite interwoven with the underlying command-line debugger. I don't
have the time to adapt DDD to new debuggers (I'm busy enough
maintaining the current ones), so you're probably stuck. As an
alternative, consider GVD (http://libre.act-europe.fr/gvd/), which may
be more extensible than DDD.
Regarding the Fortran problems with DDD/GDB (insensitive case names,
appended underscores), try `set language fortran' at the GDB prompt;
DDD should then automatically `fortranize' names. The enclosed patch
may help with accessing Fortran structure members.
Good luck,
Andreas
Index: DispValue.C
===================================================================
RCS file: /cvsroot/ddd/ddd/ddd/DispValue.C,v
retrieving revision 1.121
diff -c -r1.121 DispValue.C
*** DispValue.C 2000/12/20 12:30:24 1.121
--- DispValue.C 2001/03/07 11:43:02
***************
*** 545,550 ****
--- 545,555 ----
member_prefix = normalize_base(member_prefix) + "{'";
member_suffix = "'}";
}
+ else if (gdb->program_language() == LANGUAGE_FORTRAN)
+ {
+ // In Fortran, members of A are accessed as A%B
+ member_prefix = normalize_base(member_prefix) + "%";
+ }
else
{
// In all other languages, members are accessed as A.B
--
Andreas Zeller Universitaet Passau
http://www.fmi.uni-passau.de/st/staff/zeller/