Adapted for SPARC. LBRAC not reliable
This commit is contained in:
parent
b1d88287ea
commit
b98e6f5029
@ -816,6 +816,7 @@ DbRead(f)
|
|||||||
open_scope(sym, 0);
|
open_scope(sym, 0);
|
||||||
sym->sy_file->f_scope = CurrentScope;
|
sym->sy_file->f_scope = CurrentScope;
|
||||||
FileScope = CurrentScope;
|
FileScope = CurrentScope;
|
||||||
|
CurrentScope->sc_start = n->on_valu;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case N_SOL:
|
case N_SOL:
|
||||||
if (! line_file) line_file = n;
|
if (! line_file) line_file = n;
|
||||||
@ -826,6 +827,12 @@ DbRead(f)
|
|||||||
break;
|
break;
|
||||||
case N_SLINE:
|
case N_SLINE:
|
||||||
assert(line_file);
|
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) {
|
if (! saw_code && !CurrentScope->sc_bp_opp) {
|
||||||
CurrentScope->sc_bp_opp = n->on_valu;
|
CurrentScope->sc_bp_opp = n->on_valu;
|
||||||
if (! CurrentScope->sc_start) {
|
if (! CurrentScope->sc_start) {
|
||||||
@ -842,12 +849,16 @@ DbRead(f)
|
|||||||
saw_code = 0;
|
saw_code = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
/* Sun-4 ld does not relocate LBRAC
|
||||||
|
values, so we cannot use it
|
||||||
|
|
||||||
register p_scope sc =
|
register p_scope sc =
|
||||||
get_scope_from_addr(n->on_valu);
|
get_scope_from_addr(n->on_valu);
|
||||||
|
|
||||||
if (!sc || sc->sc_bp_opp) {
|
if (!sc || sc->sc_bp_opp) {
|
||||||
}
|
}
|
||||||
else CurrentScope = sc;
|
else CurrentScope = sc;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
lbrac_level++;
|
lbrac_level++;
|
||||||
needs_newscope = 1;
|
needs_newscope = 1;
|
||||||
|
|||||||
@ -4,10 +4,29 @@
|
|||||||
|
|
||||||
#include "rd.h"
|
#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)
|
#if defined(sun) && defined(mc68020)
|
||||||
#define relocation_info reloc_info_68k
|
#define relocation_info reloc_info_68k
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(sun) && defined(sparc)
|
||||||
|
#define relocation_info reloc_info_sparc
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <a.out.h>
|
#include <a.out.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user