|
|
Up |
|
|
  |
Author: Arjen MarkusArjen Markus Date: Dec 6, 2007 06:29
On 6 dec, 12:37, j...@phys.au.dk wrote:
> Hi, I am new to fortran programming, and I need to use a debugging
> tool. Can anyone explain to me how to get it and how to use it? I've
> tried compiling with the "-g", but it doesn't seem to do anything. I
> assume i need a third program to handle the debugging phase?
>
> Thanks in advance :)
> regards Jakob
>
> PS: im not much into programming, so plz keep it simple :D
You do:
g95 -g just prepares a debuggable program
Use gdb to actually debug it.
Consult the man pages on gdb for how to use it - it is
a command-driven program, not a GUI.
Regards,
Arjen
|
| |
|
| | 16 Comments |
|
  |
Author: BeliavskyBeliavsky Date: Dec 6, 2007 07:58
On Dec 6, 9:29 am, Arjen Markus wrote:
> On 6 dec, 12:37, j...@phys.au.dk wrote:
>
>> Hi, I am new to fortran programming, and I need to use a debugging
>> tool. Can anyone explain to me how to get it and how to use it? I've
>> tried compiling with the "-g", but it doesn't seem to do anything. I
>> assume i need a third program to handle the debugging phase?
>
>> Thanks in advance :)
>> regards Jakob
>
>> PS: im not much into programming, so plz keep it simple :D
>
> You do:
>
> g95 -g just prepares a debuggable program
>
> Use gdb to actually debug it.
>
> Consult the man pages on gdb for how to use it - it is ...
|
| Show full article (0.78Kb) |
|
| | no comments |
|
  |
Author: Bart VandewoestyneBart Vandewoestyne Date: Dec 6, 2007 11:15
On 2007-12-06, Beliavsky aol.com> wrote:
>
>> You do:
>>
>> g95 -g just prepares a debuggable program
>>
>> Use gdb to actually debug it.
>>
>> Consult the man pages on gdb for how to use it - it is
>> a command-driven program, not a GUI.
>
> The OP specified the Windows OS. Maybe he needs to download and
> install gdb.
While we're at it... let me ask this question: for the 3 to 4
years that I'm into Fortran 95 programming now, I've always
debugged my programs with the necessary print statements. Once
in a wile, I fired up gdb but apparently it didn't impress me
enough or i was too lazy to really put effort into examining how
to effectively use it.
|
| Show full article (1.32Kb) |
| no comments |
|
  |
Author: nospamnospam Date: Dec 6, 2007 11:32
Bart Vandewoestyne wrote:
> So my question to this group: suppose you work with vi as your
> source code editor, and you compile your programs in a terminal
> window using your favorite Fortran 95 compiler and Makefiles, (so
> no IDE) then what is your personal preference for `the most effective way
> of debugging'?
Switch to emacs. :-) (Just kidding; it had to be said.)
> For now, print statements worked just fine for me, but if someone
> can convince me that putting effort in learning how to
> effectively work with gdb or some other debugging tool can
> improve my debugging capabilities, i would be interested to dig a
> bit more into that...
I've rarely gotten much out of debuggers. On occasion, but rarely.
Perhaps it is because I've never invested the time to learn to use one
well, but I've never really felt it necessary.
|
| Show full article (1.38Kb) |
| no comments |
|
  |
Author: Gib BogleGib Bogle Date: Dec 6, 2007 12:58
Bart Vandewoestyne wrote:
> On 2007-12-06, Beliavsky aol.com> wrote:
>>> You do:
>>>
>>> g95 -g just prepares a debuggable program
>>>
>>> Use gdb to actually debug it.
>>>
>>> Consult the man pages on gdb for how to use it - it is
>>> a command-driven program, not a GUI.
>> The OP specified the Windows OS. Maybe he needs to download and
>> install gdb.
>
> While we're at it... let me ask this question: for the 3 to 4
> years that I'm into Fortran 95 programming now, I've always
> debugged my programs with the necessary print statements. Once
> in a wile, I fired up gdb but apparently it didn't impress me
> enough or i was too lazy to really put effort into examining how
> to effectively use it.
> ...
|
| Show full article (1.59Kb) |
| no comments |
|
  |
Author: Mike McGinnMike McGinn Date: Dec 6, 2007 16:11
Bart Vandewoestyne wrote:
> On 2007-12-06, Beliavsky aol.com> wrote:
>>> You do:
>>>
>>> g95 -g just prepares a debuggable program
>>>
>>> Use gdb to actually debug it.
>>>
>>> Consult the man pages on gdb for how to use it - it is
>>> a command-driven program, not a GUI.
>> The OP specified the Windows OS. Maybe he needs to download and
>> install gdb.
>
> While we're at it... let me ask this question: for the 3 to 4
> years that I'm into Fortran 95 programming now, I've always
> debugged my programs with the necessary print statements. Once
> in a wile, I fired up gdb but apparently it didn't impress me
> enough or i was too lazy to really put effort into examining how
> to effectively use it.
> ...
|
| Show full article (1.97Kb) |
| no comments |
|
  |
Author: J.F. CornwallJ.F. Cornwall Date: Dec 6, 2007 19:17
Bart Vandewoestyne wrote:
> On 2007-12-06, Beliavsky aol.com> wrote:
>
>>>You do:
>>>
>>>g95 -g just prepares a debuggable program
>>>
>>>Use gdb to actually debug it.
>>>
>>>Consult the man pages on gdb for how to use it - it is
>>>a command-driven program, not a GUI.
>>
>>The OP specified the Windows OS. Maybe he needs to download and
>>install gdb.
>
>
> While we're at it... let me ask this question: for the 3 to 4
> years that I'm into Fortran 95 programming now, I've always
> debugged my programs with the necessary print statements. Once
> in a wile, I fired up gdb but apparently it didn't impress me ...
|
| Show full article (2.24Kb) |
| no comments |
|
  |
Author: Bart VandewoestyneBart Vandewoestyne Date: Dec 7, 2007 00:25
On 2007-12-06, Bart Vandewoestyne wrote:
>
> While we're at it... let me ask this question: for the 3 to 4
> years that I'm into Fortran 95 programming now, I've always
> debugged my programs with the necessary print statements. Once
> in a wile, I fired up gdb but apparently it didn't impress me
> enough or i was too lazy to really put effort into examining how
> to effectively use it.
>
> So my question to this group: suppose you work with vi as your
> source code editor, and you compile your programs in a terminal
> window using your favorite Fortran 95 compiler and Makefiles, (so
> no IDE) then what is your personal preference for `the most effective way
> of debugging'?
>
> For now, print statements worked just fine for me, but if someone
> can convince me that putting effort in learning how to
> effectively work with gdb or some other debugging tool can
> improve my debugging capabilities, i would be interested to dig a
> bit more into that... ...
|
| Show full article (1.65Kb) |
| no comments |
|
  |
Author: Arjen MarkusArjen Markus Date: Dec 7, 2007 01:52
On 6 dec, 20:15, Bart Vandewoestyne
wrote:
> On 2007-12-06, Beliavsky aol.com> wrote:
>
>
>
>>> You do:
>
>>> g95 -g just prepares a debuggable program
>
>>> Use gdb to actually debug it.
>
>>> Consult the man pages on gdb for how to use it - it is
>>> a command-driven program, not a GUI.
>
>> The OP specified the Windows OS. Maybe he needs to download and
>> install gdb.
>
> While we're at it... let me ask this question: for the 3 to 4
> years that I'm into Fortran 95 programming now, I've always ...
|
| Show full article (2.84Kb) |
| no comments |
|
  |
|
|
  |
Author: Helge AvlesenHelge Avlesen Date: Dec 7, 2007 02:18
Bart Vandewoestyne writes:
> While we're at it... let me ask this question: for the 3 to 4
> years that I'm into Fortran 95 programming now, I've always
> debugged my programs with the necessary print statements. Once
> in a wile, I fired up gdb but apparently it didn't impress me
> enough or i was too lazy to really put effort into examining how
> to effectively use it.
gdb could potentially be really good for Fortran debugging. it is a
small executable with short startup time, good command line editing
features, macros etc. but unfortunately the current support for
e.g. arrays is extremely user unfriendly... for g95 you often need to
know how the different types of arrays are laid out internally in the
"c world" in order to inspect the contents. and forget about using fortran
array syntax from gdb.
|
| Show full article (1.38Kb) |
| no comments |
|
|
|
|