[gnu.gcc.bug] gcc 1.35 and dbx symbol table info bug.

mike@DART.CS.BYU.EDU (Mike Burbidge) (05/24/89)

Machine: Sun386i/150
Operating System: SunOS 4.0.1
GNU Product: GCC 1.35

Dbx has problems debugging the following program. It appears that GCC
is not building the symbol table information correctly. When in dbx
the following dialogue occurs:

debug foo
 Reading symbolic information...
 Read 129 symbols
stop at "file/home/infoq/burb//foo.c":9
 (1) stop at 18
stop in main
 (2) stop in main

As can be seen dbx has problems stopping at line 9, the first printf
statement. This is a small example of the problem, I have it on a
much worse scale for anything realistic. dbx is just not usable. I
would like to use gdb, but it is not done for the Sun386i.

---------------------------------- Cut -------------------------------
#include <stdio.h>


main ()
{
  int  i;
  char s[80];

  printf ("enter name: ");
  gets (s);
  printf ("reverse of '%s' = ", s);
  strrev (s);
  printf ("'%s'\n", s);
}


strrev (s)
  char *s;
{
  char buf[80];
  int  i;
  int  j = 0;

  i = strlen (s);

  while (--i >= 0)
    buf[j++] = s[i];

  buf[j] = '\0';

  strcpy (s, buf);
}
---------------------------------- Cut -----------------------------

Mike Burbidge
mike@cs.byu.edu