Bug fix for GDB 3.5 with COFF

Chip Salzenberg chip at tct.uucp
Wed Aug 8 02:26:55 AEST 1990


This patch fixes a bug that shows up in GDB 3.5 when reading COFF
files.  The code that reads enum members doesn't stop when it should,
thus consuming symbols that should be read elsewhere.  In my system,
it showed up when debugging gdb failed; gdb complained because the
.bb/.eb (begin block/end block) symbols didn't nest properly.

Index: coffread.c
***************
*** 1916,1919 ****
--- 1916,1920 ----
    register int n;
    char *name;
+   int done = 0;
  #ifdef NAMES_HAVE_UNDERSCORE
    int offset = 1;
***************
*** 1929,1933 ****
    osyms = *symlist;
  
!   while (symnum < lastsym && symnum < nlist_nsyms_global)
      {
        read_one_sym (ms, &sub_sym, &sub_aux);
--- 1930,1934 ----
    osyms = *symlist;
  
!   while (!done && symnum < lastsym && symnum < nlist_nsyms_global)
      {
        read_one_sym (ms, &sub_sym, &sub_aux);
***************
*** 1950,1953 ****
--- 1951,1955 ----
  
  	  case C_EOS:
+ 	    done = 1;
  	    break;
  	}
-- 
Chip Salzenberg at ComDev/TCT     <chip at tct.uucp>, <uunet!ateng!tct!chip>



More information about the Comp.unix.i386 mailing list