Xref: utzoo comp.unix.i386:7651 comp.sources.bugs:2470 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!mips!daver!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.unix.i386,comp.sources.bugs Subject: Bug fix for GDB 3.5 with COFF Message-ID: <26BEEBD0.2ACA@tct.uucp> Date: 7 Aug 90 16:26:55 GMT Organization: ComDev/TCT, Sarasota, FL Lines: 38 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 ,