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;
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) {
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;
#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 <a.out.h>
#include <stdio.h>