GDB?
Christian Brembilla <[email protected]> Sat, 6 Feb 2016 17:08:46 +0000
| Newsgroups | gmane.comp.debugging.ddd.bugs |
|---|---|
| Message-ID | <[email protected]> |
--_000_0469cba3e5d94318955f31b7c2478ffcUMUEX02adumuse_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Dear all,
I am really new in Fortran and GDB. So sorry if I am asking you some silly=
questions but I am stuck.
I want to explain to you every steps so there won=B4t be misleading.
I am running my program in F77 (Path=3D\F\G77\bin and library path=3D \F\=
g77\lib slatec)
I have also download GNU but I used G77 since I found some practical exampl=
es on the net.
I am using the prompt from windows.
I believe that it can be useful a debugger with breakpoints so I can unders=
tand
where I am doing mistakes.
I download the GDB version gdb-7.10.1 but unfortunately I cannot understand
how can work. I mean in operative way. I looked at the pdf file gdb.pdf at =
the paragraph:
Getting In and Out of GDB.
Unfortunately when I am typing gdb at the prompt I got the
Gdb is not recognized as an internal or external command
Do I have to type some path? Which one?
Could you please provide me a practical example?
For instance, I can explain you what I am doing with Fortran in this way th=
ere are no doubts or
misleading.
1. I made a program as the program below:
File panel.for
program panel
implicit none
real tin, Qn, tex
read*, n, e, dt, Tmax
do i =3D 2, Tmax
do j =3D 1, e
if (j .GT. 1) then
tsu =3Dtex(i,j-1)
end if ...
... end do
end do
2. I compiled the program in the prompt by typing
C:\F\Panel>f2exe panel
C:\F\Panel> panel
From here my program start correctly by asking me some values.
But when it solves the nested loop I got some odd values -1IND
A debugger may be useful to understand what is going on.
Best regards,
Christian
--_000_0469cba3e5d94318955f31b7c2478ffcUMUEX02adumuse_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:94446968;
mso-list-type:hybrid;
mso-list-template-ids:-1484063808 69009423 69009433 69009435 69009423 6900=
9433 69009435 69009423 69009433 69009435;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"SV" link=3D"#0563C1" vlink=3D"#954F72">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span lang=3D"EN-US">Dear all,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I am really new in Fortran and =
GDB. So sorry if I am asking you some silly questions but I am stuck.=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I want to explain to you every =
steps so there won=B4t be misleading.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I am running my program in F77 =
(Path=3D\F\G77\bin and library path=3D \F\g77\lib slatec)<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I have also download GNU but I =
used G77 since I found some practical examples on the net.<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I am using the prompt from <b>w=
indows.</b><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I believe that it can be useful=
a debugger with breakpoints so I can understand
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">where I am doing mistakes.<o:p>=
</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I download the GDB version gdb-=
7.10.1 but unfortunately I cannot understand
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">how can work. I mean in operati=
ve way. I looked at the pdf file
<i>gdb.pdf</i> at the paragraph: <o:p></o:p></span></p>
<p class=3D"MsoNormal"><i><span lang=3D"EN-US">Getting In and Out of GDB.<o=
:p></o:p></span></i></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Unfortunately when I am typing =
gdb at the prompt I got the
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><i><span lang=3D"EN-US">Gdb is not recognized as an =
internal or external command<o:p></o:p></span></i></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Do I have to type some path? Wh=
ich one?<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Could you please provide me a p=
ractical example?<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">For instance, I can explain you=
what I am doing with Fortran in this way there are no doubts or<o:p></o:p>=
</span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">misleading.<o:p></o:p></span></=
p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoListParagraph" style=3D"text-indent:-18.0pt;mso-list:l0 leve=
l1 lfo1"><![if !supportLists]><span lang=3D"EN-US"><span style=3D"mso-list:=
Ignore">1.<span style=3D"font:7.0pt "Times New Roman""> &nbs=
p;
</span></span></span><![endif]><span lang=3D"EN-US">I made a program as the=
program below:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><i><span lang=3D"EN-US">File panel.for<o:p></o:p></s=
pan></i></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">program panel<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">implicit none<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">real tin, Qn, tex<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">read*, n, e, dt, Tmax<o:p></o:p=
></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">do i =3D 2, Tmax<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> do j =3D 1, =
e<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> =
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp;if (j .GT. 1) then<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> =
tsu =3Dtex(i,j-1)<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"> &=
nbsp; end if …<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">… end do <o:p></o:p></spa=
n></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">end do<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoListParagraph" style=3D"text-indent:-18.0pt;mso-list:l0 leve=
l1 lfo1"><![if !supportLists]><span lang=3D"EN-US"><span style=3D"mso-list:=
Ignore">2.<span style=3D"font:7.0pt "Times New Roman""> &nbs=
p;
</span></span></span><![endif]><span lang=3D"EN-US">I compiled the program =
in the prompt by typing
<o:p></o:p></span></p>
<p class=3D"MsoNormal" style=3D"text-indent:18.0pt"><span lang=3D"EN-US">C:=
\F\Panel>f2exe panel<o:p></o:p></span></p>
<p class=3D"MsoNormal" style=3D"text-indent:18.0pt"><span lang=3D"EN-US">C:=
\F\Panel> panel<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">From here my program start corr=
ectly by asking me some values.
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">But when it solves the nested l=
oop I got some odd values -1IND<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">A debugger may be useful to und=
erstand what is going on.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Best regards,<o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Christian<o:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>
--_000_0469cba3e5d94318955f31b7c2478ffcUMUEX02adumuse_--