From: ceriel Date: Fri, 27 Sep 1991 14:58:30 +0000 (+0000) Subject: Adapted for SPARC. LBRAC not reliable X-Git-Tag: release-5-5~807 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=3a0c4d87047fb5464e6c32cfb48a443645549d4b;p=ack.git Adapted for SPARC. LBRAC not reliable --- diff --git a/util/grind/db_symtab.g b/util/grind/db_symtab.g index b5ac12b08..4f8bff13c 100644 --- a/util/grind/db_symtab.g +++ b/util/grind/db_symtab.g @@ -816,6 +816,7 @@ DbRead(f) open_scope(sym, 0); sym->sy_file->f_scope = CurrentScope; FileScope = CurrentScope; + CurrentScope->sc_start = n->on_valu; /* fall through */ case N_SOL: if (! line_file) line_file = n; @@ -826,6 +827,12 @@ DbRead(f) break; case N_SLINE: assert(line_file); + if (CurrentScope->sc_start) { + register p_scope sc = + get_scope_from_addr(n->on_valu); + + if (sc) CurrentScope = sc; + } if (! saw_code && !CurrentScope->sc_bp_opp) { CurrentScope->sc_bp_opp = n->on_valu; if (! CurrentScope->sc_start) { @@ -842,12 +849,16 @@ DbRead(f) saw_code = 0; } else { + /* Sun-4 ld does not relocate LBRAC + values, so we cannot use it + register p_scope sc = get_scope_from_addr(n->on_valu); if (!sc || sc->sc_bp_opp) { } else CurrentScope = sc; + */ } lbrac_level++; needs_newscope = 1; diff --git a/util/grind/rd.c b/util/grind/rd.c index a4c5cc30d..928c6fff3 100644 --- a/util/grind/rd.c +++ b/util/grind/rd.c @@ -4,10 +4,29 @@ #include "rd.h" -#if (defined(sun) && defined(mc68020)) || defined(vax) +#if defined(__sun) +#define sun +#endif + +#if defined(__mc68020) +#define mc68020 +#endif + +#if defined(__sparc) +#define sparc +#endif + +#if defined(__vax) +#define vax +#endif + +#if defined(sun) || defined(vax) #if defined(sun) && defined(mc68020) #define relocation_info reloc_info_68k #endif +#if defined(sun) && defined(sparc) +#define relocation_info reloc_info_sparc +#endif #include #include