From: Russell Browne (russ_at_amc.com)
Date: Thu Oct 04 2001 - 17:53:04 BST
John Utz writes: > there is a patch that i assume has gone into the src tree for the next > beta. > > i found the problem at the beginning of last week and russ took alook at > it and made a partial fix. This is the third time this problem has been reported in about a month. The problem results from changes in the syntax for debug information (stabs) in the newer gnu compiler. Here is the patch file. The patch can be applied to the version of ao_symparse.c in either 3.36 or the current beta, since that file is unchanged by the current beta. To run the patch, cd the the directory containing ao_symparse.c and run patch < ao_symparse.c.diff The patch hasn't been tested on large applications yet. There may well be more changes in the debug information that a large app would uncover. Russ ============ ao_symparse.c.diff ========== *** ao_symparse.c Thu May 25 03:02:44 2000 --- ao_symparse.c Fri Sep 28 11:15:11 2001 *************** *** 313,319 **** } while ((pos = strchr(s, '=')) != NULL) { ! int fnum, tnum; const char *matchpos; Ftype *ft; bool is_undef_tag; --- 313,319 ---- } while ((pos = strchr(s, '=')) != NULL) { ! int fnum, tnum=-1; const char *matchpos; Ftype *ft; bool is_undef_tag; *************** *** 337,347 **** --pos; matchpos = pos; ! fnum = stf->stf_fnum; ! tnum = parse_num(stf, sr, &pos); } ! ft = note_def_pos(stf->stf_fmap[fnum]->hf_stf, tnum, symno, matchpos - base, is_undef_tag); --- 337,351 ---- --pos; matchpos = pos; ! if ( isdigit(pos[0])) ! { ! fnum = stf->stf_fnum; ! tnum = parse_num(stf, sr, &pos); ! } } ! if ( tnum >= 0) ! ft = note_def_pos(stf->stf_fmap[fnum]->hf_stf, tnum, symno, matchpos - base, is_undef_tag); *************** *** 1654,1659 **** --- 1658,1670 ---- ae->ae_aggr_members == NULL) { dim_t dim_dummy; + + if ( *s != '-' ) + { + *p_s = s; + return TypeDef(stf, sr, p_s, tnum, eval); + } + dim_dummy.di_low = 0; dim_dummy.di_high = 1; get_basic_type(stf, stf->stf_language, stf->stf_symtab, *************** *** 2630,2635 **** --- 2641,2650 ---- Typenum(stf, sr, FALSE, &s, &junk, &junk); } scheck(sr, &s, ';'); + + /* RCB: Have seen an extra ';' here from gnu */ + if ( *s == ';') + scheck(sr, &s, ';'); get_subrange_dim(stf, sr, &s, &dim->di_ltype, &dim->di_low); scheck(sr, &s, ';');
This archive was generated by hypermail 2.1.4 : Wed Feb 13 2002 - 21:51:34 GMT