[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [photran] Problems with gdb on a Mac
|
Photran Mailing List,
I was able to solve my own problem. For posterity, I will share what
I did to get this working.
1) Install gcc46 gfortran from mac ports:
sudo port install gcc46 +gfortran
2) Install gdb from mac ports:
sudo port install gdb
3) Move XCode gdb:
sudo mv /usr/bin/gdb /usr/bin/xcodegdb
4) Symlink mac port gdb:
sudo ln -s /usr/local/bin/gdb /usr/bin/gdb
5) Set access as per https://trac.macports.org/ticket/19871
sudo chgrp procmod /usr/local/bin/gdb
sudo chmod g+s /usr/local/bin/gdb
That's it! I am now able to see common block variables in Photran.
Best wishes,
Jeff
On Mon, Nov 15, 2010 at 9:33 AM, Jeff Steward <jeffsteward@xxxxxxxxx> wrote:
> Photran Mailing List,
>
> I am having problems debugging my code in Photran using gdb.
>
> I have some nasty old code that has implicit double precision. When I
> try to debug it, I see several errors in red in the console:
>
> A syntax error in expression, near `kind=4)'.
> A syntax error in expression, near `kind=4) [500]'.
> A syntax error in expression, near `kind=8) [200]'.
> A syntax error in expression, near `kind=8) [300]'.
> A syntax error in expression, near `kind=8)'.
> A syntax error in expression, near `kind=8) [21][21][81]'.
> A syntax error in expression, near `kind=8) [21][21]'.
> A syntax error in expression, near `kind=8) [80]'.
> A syntax error in expression, near `kind=8) [21][81]'.
> A syntax error in expression, near `kind=4)'.
> A syntax error in expression, near `kind=8) [19323]'.
> A syntax error in expression, near `kind=4) [3]'.
> A syntax error in expression, near `kind=4) [7]'.
> A syntax error in expression, near `kind=4) [2]'.
> A syntax error in expression, near `kind=8) [8]'.
> A syntax error in expression, near `kind=4) [2]'.
> A syntax error in expression, near `kind=4)'.
> A syntax error in expression, near `kind=8) [715219]'.
>
> In the Variables tab of the debugging view, I can see a lot of my
> variables; however, most of them (but not all!) are missing values,
> and when I click on the ones missing a value, in the box below the
> variable list I see the message:
>
> Target request failed: Cannot access memory at address 0x0.
>
> Here is my makefile:
>
> all:
> gfortran -W -g3 -c *.f90
> gfortran -g3 *.o -o swe.exe
> clean:
> rm -f swe.exe *.o
>
> I am using gfortran 4.6.0 20101106 (experimental) installed by
> macports. I have tested the gdb that comes with XCode GNU gdb
> 6.3.50-20050815 (Apple version gdb-1461.2) as well as one installed
> with macports GNU gdb (GDB) 7.2. Both versions of gdb give the same
> problem in Photran.
>
> However, I can debug with gdb from the terminal (i.e. without photran)
> with no issues.
>
> Any ideas?
>
> Best wishes,
>
> Jeff
>