This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using g77 and gdb together
>line 1550: ffewhereLineNumber linecount_current = ffelex_linecount_current_;
>
>and
>
>line 1605: ffelex_linecount_current_ = linecount_current;
>
>I've tried this and so far everything seems to be working fine. I'm now
>able to debug a program with 2 levels of INCLUDE with no problems
>whatsoever (at least as far as following the source goes).
>
>It seems to me that it would really be worth the effort for someone who
>knows a lot more about g77 than I to check and see if this modifcation
>makes sense and isn't likely to cause other problems because it makes
>a night versus day improvement in debugging files with nested INCLUDE's.
I've just tried this patch, and it has no effect whatsover on my
private test suite. Apparently that's due to a bug in it (my
suite, not the patch), in that it doesn't pick up INCLUDE files
correctly.
So, the good news is that this patch doesn't seem to break anything
as far as I can see.
The better news is that, indeed, when I compile a simple nested-INCLUDE
example and debug it, this patch makes gdb much happier -- no complaints
about the line numbers being out-of-range.
So I approve this patch, which I include below as a more "proper" one. Want
to write a ChangeLog entry?
tq vm, (burley)
P.S. Sorry it took me a bit of time to get to this. I wanted to bring
my test suite and gcc-directory build tree up to date before working
on it, and found a problem or two while doing that.
*** g77-e/gcc/f/lex.c.~1~ Sat Mar 27 05:23:57 1999
--- g77-e/gcc/f/lex.c Fri Aug 27 10:43:55 1999
*************** ffelex_include_ ()
*** 1548,1552 ****
ffewhereColumnNumber final_nontab_column = ffelex_final_nontab_column_;
ffewhereFile current_wf = ffelex_current_wf_;
- ffewhereLineNumber linecount_current = ffelex_linecount_current_;
ffewhereLineNumber linecount_offset
= ffewhere_line_filelinenum (current_wl);
--- 1548,1551 ----
*************** ffelex_include_ ()
*** 1603,1607 ****
lineno = old_lineno;
#endif
- ffelex_linecount_current_ = linecount_current;
ffelex_current_wf_ = current_wf;
ffelex_final_nontab_column_ = final_nontab_column;
--- 1602,1605 ----