This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch: regression: C++ overload


This patch fixes a regression in gdb introduced some time between 1/10
and 3/21.  The symptom of it is unitialized memory reference in
valops.c (find_overload_match).  This patch backs out a couple of
bad changes.

- Jimmy Guo, guo@cup.hp.com

ChangeLog:
2000-03-23	Jimmy Guo	<guo@cup.hp.com>

	* gdbtypes.c (rank_function): Rank all N parameters and use correct
	index into the parms[] and args[] arrrays.

Index: gdbtypes.c
/usr/local/bin/diff -c -w -L gdbtypes.c gdbtypes.c@@/main/cygnus/16 gdbtypes.c
*** gdbtypes.c
--- gdbtypes.c	Thu Mar 23 17:27:28 2000
***************
*** 2136,2143 ****
    LENGTH_MATCH (bv) = (nargs != nparms) ? LENGTH_MISMATCH_BADNESS : 0;
  
    /* Now rank all the parameters of the candidate function */
!   for (i = 1; i < min_len; i++)
!     bv->rank[i] = rank_one_type (parms[i], args[i]);
  
    /* If more arguments than parameters, add dummy entries */
    for (i = min_len + 1; i <= nargs; i++)
--- 2136,2143 ----
    LENGTH_MATCH (bv) = (nargs != nparms) ? LENGTH_MISMATCH_BADNESS : 0;
  
    /* Now rank all the parameters of the candidate function */
!   for (i = 1; i <= min_len; i++)
!     bv->rank[i] = rank_one_type (parms[i-1], args[i-1]);
  
    /* If more arguments than parameters, add dummy entries */
    for (i = min_len + 1; i <= nargs; i++)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]