From: GARY GENDEL (ggendel_at_sarnoff.com)
Date: Mon Apr 28 2003 - 14:10:45 BST
Flemming, Perfect! Thanks. Only one error in the patch for the latest code. I've included the reject file. Seems that make_fil() has become ao_make_fil(). A quick hand edit fixed this. Gary Flemming Madsen wrote: > Hi Gary > > Try this one. I dont think its folded into the release yet. > It also gave me my struct members back in .C (Capital C) files. > > /Flemming > > > GARY GENDEL wrote: > >> Hi, >> >> I am a big fan of UPS and have been using it since the late 80's. >> Recently I upgraded my compilers on Solaris 8 to gcc 3.2.1 and Sun One >> 7.0. These broke my current version of ups. >> >> So, I compiled 3.38beta1 of ups. When I debug an executable compiled >> with gcc, I get a whole bunch of messages like the following: >> >> unmatched N_BINCL symbol in ../fdebug.SOLARIS/simic (delayp.c) >> >> If I try the same program using Sun One, I get messages like: >> >> ../fdebug.SOLARIS/simic stab.index symbol #2086: unknown type 132 >> >> The debugger seems to work, but has anyone else seen this problem? >> Anyone working on a fix? >> >> Regards, >> Gary >> >> > > > ------------------------------------------------------------------------ > > --- ao_elfsym.c.orig Mon Mar 18 17:49:26 2002 > +++ ao_elfsym.c Tue Nov 5 08:27:48 2002 > @@ -176,6 +176,7 @@ > alloc_pool_t *ap; > bool seen_sosym_but_no_optsym; > Symrec symrec; > + language_t lang; > > file_offset = next_file_offset = 0; > objdir = path_hint = NULL; > @@ -236,7 +237,7 @@ > else { > > stf = make_stf(ap, alloc_strdup(ap, path), > - st, 0, srctype(path), 0); > + st, 0, LANG_UNKNOWN, 0); > > new_sfiles = make_fil(stf, rootblock, > alloc_strdup(ap, > @@ -248,6 +249,7 @@ > } > > path_hint = NULL; > + lang = srctype(path); > > prefix = stf->stf_global_prefix; > pflen = (prefix != NULL) ? strlen(prefix) : 0; > @@ -255,6 +257,10 @@ > seen_sosym_but_no_optsym = TRUE; > > break; > + case N_SOL: > + /* Emitted from SC5.3 (Forte 6) > + * Along with N_SO which apparently suffice FMA */ > + break; > > case N_OPT: > /* The Sun C compiler emits an N_OPT before any N_SO, > @@ -278,6 +284,10 @@ > symstring(symio, symno), > (time_t)nm.n_value, > &has_debug_syms); > + if (stf->stf_language == LANG_UNKNOWN) > + stf->stf_language = lang; /* set from extension */ > + if (stf->stf_fil->fi_language == LANG_UNKNOWN) > + stf->stf_fil->fi_language = stf->stf_language; > > /* There's no point loading symbols from object > * files that weren't compiled with -g. Also, > --- ao_symparse.c.orig Mon Jan 7 17:54:52 2002 > +++ ao_symparse.c Tue Nov 5 08:38:11 2002 > @@ -838,7 +838,7 @@ > Symrec *sr; > const char **p_s; > { > - int res; > + int res = -1; > > if (!parse_number(stf, sr, p_s, &res)) > panic("bad number in parse_num"); > @@ -1824,6 +1824,7 @@ > Compiler_type compiler = CT_CC; > bool terminate = FALSE; > bool sun_pro =FALSE; > + bool sun_pro5 =FALSE; > > if (stf->stf_compiler_type == CT_UNKNOWN) > compiler = ao_compiler(NULL, FALSE, CT_UNKNOWN); > @@ -1840,6 +1841,7 @@ > if (is_struct == 2 || *(*p_s - 2) == 'Y') /* RGA SC3 class or struct */ > { > sun_pro = TRUE; > + sun_pro5 = *(*p_s - 2) == 'Y'; > field_scheck(sr, &s, ';'); > members = SunProBaseClass(stf,sr,&s, eval, compiler); > } else if ( *s == '!') > @@ -1867,6 +1869,15 @@ > if (*s != ':' && *s != '?' && !isalpha(*s) && *s != '_' && > *s != '$' && *s != '.' && *s != '!') > break; > + > + /* Somewhere between SC5.0 and SC5.3 (Forte 6) the > + * <ppp-char><mangle> form apparently became > + * <ppp-char><two undocumented><unmangled> > + * The former is handled in demangle_name() FMA */ > + if (sun_pro5 && strlen(s) > 3 && > + (s[0] == 'A' || s[0] == 'B' || s[0] == 'C') && > + !(s[1] == '_' && s[2] == '_')) > + s += 3; > > members = Field(stf, sr, &s, is_struct, members, > eval, compiler, &terminate); > --- ao_symscan.c.orig Mon May 13 13:02:00 2002 > +++ ao_symscan.c Tue Nov 5 08:08:34 2002 > @@ -848,6 +848,7 @@ > #endif > Compiler_type next_compiler = CT_UNKNOWN; > bool set_compiler = FALSE; > + fil_t *last_fil = NULL; > > hf_t **fmap, **istack; > ao_stdata_t *ast; > @@ -1050,6 +1051,7 @@ > #ifdef AO_ELF > stf->stf_symio = symio; > #endif > + last_fil = > st->st_sfiles = make_fil(stf, rootblock, path_hint, st->st_sfiles); > #ifndef OS_LINUX > if (!path_hint && lang == LANG_CC) > @@ -1059,6 +1061,7 @@ > > set_compiler = next_compiler != CT_UNKNOWN; > > + /* Assumes: N_OPT before N_SO */ > if ( set_compiler ) > { > stf->stf_compiler_type = next_compiler; > @@ -1202,18 +1205,29 @@ > if (cptr== NULL) > break; > > - elf_handle_optsym(ap, cptr, > - stf ? &stf->stf_language : NULL, > + lang = LANG_UNKNOWN; > + elf_handle_optsym(ap, cptr, &lang, > &next_global_prefix, > &next_compiler, > &has_debug_syms); > if (stf && !set_compiler) > { > + /* Case for N_SO before N_OPT ? */ > stf->stf_compiler_type = next_compiler; > stf->stf_global_prefix = next_global_prefix; > stf->stf_obj_mtime = nm.n_value; > next_compiler = CT_UNKNOWN; > next_global_prefix = NULL; > + if (lang != LANG_UNKNOWN) > + { > + /* This should be a better bet than the file extension */ > + stf->stf_language = lang; > + if (last_fil != NULL) > + { > + last_fil->fi_language = lang; > + last_fil = NULL; > + } > + } > } > break; > #endif *************** *** 1067,1072 **** #ifdef AO_ELF stf->stf_symio = symio; #endif st->st_sfiles = make_fil(stf, rootblock, path_hint, st->st_sfiles); #ifndef OS_LINUX if (!path_hint && lang == LANG_CC) --- 1068,1074 ---- #ifdef AO_ELF stf->stf_symio = symio; #endif + last_fil = st->st_sfiles = make_fil(stf, rootblock, path_hint, st->st_sfiles); #ifndef OS_LINUX if (!path_hint && lang == LANG_CC)
This archive was generated by hypermail 2.1.4 : Tue Apr 29 2003 - 11:16:21 BST