Sender: ml AT delorie DOT com Message-ID: <345DFD86.3D63B3F9@cdata.tvnet.hu> Date: Mon, 03 Nov 1997 17:36:22 +0100 From: Molnar Laszlo MIME-Version: 1.0 To: DJGPP workers Subject: fsdb bug Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Hi Workers! It seems, that CTRL-G doesn't work perfectly with fsdb. I realized this debugging perl, and wanted to jump to a symbol called _Perl_comppad. However fsdb jumped to _Perl_comppad_name. It happens because the binary search in debug/common/syms.c doesn't check the full name of the symbol, but returns the first partial match. Below is a patch that solves this problem for me (I hope it won't break something else). Laszlo *** src/debug/common/syms.c~ Sat Apr 22 19:29:52 1995 --- src/debug/common/syms.c Mon Nov 3 03:54:12 1997 *************** *** 512,516 **** --- 512,520 ---- c = strncmp(name, syms_byname[mid].name+ofs, idx); if (c == 0) + { + while (mid && strncmp(name, syms_byname[mid-1].name+ofs, idx) == 0) + mid--; return mid; + } if (c < 0) above = mid;