Mail Archives: djgpp-workers/1997/11/03/11:44:27
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;
- Raw text -