Group members,
I want to study the call tree of g95 using gdb (GNU debugger). To elaborate with an example, suppose I give the following program to g95 to compile:
! add.f90
program test
implicit none
int a,b,c
a=1
b=2
c=a+b
end program test
I want to trace the C language functions in g95's source code that are called while compiling add.f90. For example, the function ‘match g95_match_assignment(void)’ in match.c is called at lines 5, 6 and 7 in add.f90 (and returns ‘MATCH_YES’). Using gdb, I want to determine, when the compiler reaches line 5 of add.f90, which function(s) called g95_match_assignment and which function(s) were called by g95_match_assignment. I want such a call-trace for every line of add.f90.
I invoke gdb as follows and get the following output:
$ gdb --args /path/to/g95/install/directory/bin/i686-pc-linux-gnu-g95 add.f90
(gdb) info functions g95_match_assignment
All functions matching regular expression "g95_match_assignment":
(gdb) info functions match_assignment
All functions matching regular expression "match_assignment":
(gdb) info functions match
All functions matching regular expression "match":
File /path/to/gcc-4.0.3//gcc/gcc.c:
static unsigned char input_suffix_matches(const char *, const char *);
static void mark_matching_switches(const char *, const char *, int);
static unsigned char switch_matches(const char *, const char *, int);
(gdb) quit
I fail to understand why gdb does not list g95_match_assignment . I configured g95-0.94 as follows:
./configure --prefix=/path/to/g95/install/directory/ --with-gcc-dir=/home/dell/sourav/compressed/gcc-4.0.3/ CFLAGS=-g --enable-debug
Could you please explain to me why gdb does not list the functions inside parse.c and match.c? Is the debugging info stripped at any stage of make-ing g95?
Thanks in advance,
Sourav