From ba69e4279d23a785f8d6b7cd94a2c5143cc6bf77 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 13 Nov 1990 17:00:51 +0000 Subject: [PATCH] Added support for DBX; Unfortunately, DBX still does not like it; GDB does --- mach/m68020/ncg/mach.c | 7 +++++++ mach/m68k2/ncg/mach.c | 7 +++++++ mach/m68k4/ncg/mach.c | 7 +++++++ mach/moon3/ncg/mach.c | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/mach/m68020/ncg/mach.c b/mach/m68020/ncg/mach.c index d6a0cbd6a..636a79860 100644 --- a/mach/m68020/ncg/mach.c +++ b/mach/m68020/ncg/mach.c @@ -208,6 +208,11 @@ mes(type) word type ; { argt = getarg(cst_ptyp); a2 = argval; argt = getarg(cst_ptyp|nof_ptyp|sof_ptyp|ilb_ptyp|pro_ptyp); +#ifdef DBX + if (a1 == N_PSYM) { + argval += 8; + } +#endif fprintf(codefile, "%s, 0x%x, %d\n", strarg(argt), a1, a2); argt = getarg(end_ptyp); break; @@ -219,6 +224,7 @@ mes(type) word type ; { argt = getarg(cst_ptyp); } swtxt(); +#ifndef DBX if (argval == N_SLINE) { #ifdef TBL68020 fputs("jsr (___u_LiB)\n", codefile); @@ -227,6 +233,7 @@ mes(type) word type ; { #endif cleanregs(); /* debugger might change variables */ } +#endif fprintf(codefile, ".symd \"%s\", 0x%x,", str, (int) argval); argt = getarg(cst_ptyp); fprintf(codefile, "%d\n", (int) argval); diff --git a/mach/m68k2/ncg/mach.c b/mach/m68k2/ncg/mach.c index d6a0cbd6a..636a79860 100644 --- a/mach/m68k2/ncg/mach.c +++ b/mach/m68k2/ncg/mach.c @@ -208,6 +208,11 @@ mes(type) word type ; { argt = getarg(cst_ptyp); a2 = argval; argt = getarg(cst_ptyp|nof_ptyp|sof_ptyp|ilb_ptyp|pro_ptyp); +#ifdef DBX + if (a1 == N_PSYM) { + argval += 8; + } +#endif fprintf(codefile, "%s, 0x%x, %d\n", strarg(argt), a1, a2); argt = getarg(end_ptyp); break; @@ -219,6 +224,7 @@ mes(type) word type ; { argt = getarg(cst_ptyp); } swtxt(); +#ifndef DBX if (argval == N_SLINE) { #ifdef TBL68020 fputs("jsr (___u_LiB)\n", codefile); @@ -227,6 +233,7 @@ mes(type) word type ; { #endif cleanregs(); /* debugger might change variables */ } +#endif fprintf(codefile, ".symd \"%s\", 0x%x,", str, (int) argval); argt = getarg(cst_ptyp); fprintf(codefile, "%d\n", (int) argval); diff --git a/mach/m68k4/ncg/mach.c b/mach/m68k4/ncg/mach.c index d6a0cbd6a..636a79860 100644 --- a/mach/m68k4/ncg/mach.c +++ b/mach/m68k4/ncg/mach.c @@ -208,6 +208,11 @@ mes(type) word type ; { argt = getarg(cst_ptyp); a2 = argval; argt = getarg(cst_ptyp|nof_ptyp|sof_ptyp|ilb_ptyp|pro_ptyp); +#ifdef DBX + if (a1 == N_PSYM) { + argval += 8; + } +#endif fprintf(codefile, "%s, 0x%x, %d\n", strarg(argt), a1, a2); argt = getarg(end_ptyp); break; @@ -219,6 +224,7 @@ mes(type) word type ; { argt = getarg(cst_ptyp); } swtxt(); +#ifndef DBX if (argval == N_SLINE) { #ifdef TBL68020 fputs("jsr (___u_LiB)\n", codefile); @@ -227,6 +233,7 @@ mes(type) word type ; { #endif cleanregs(); /* debugger might change variables */ } +#endif fprintf(codefile, ".symd \"%s\", 0x%x,", str, (int) argval); argt = getarg(cst_ptyp); fprintf(codefile, "%d\n", (int) argval); diff --git a/mach/moon3/ncg/mach.c b/mach/moon3/ncg/mach.c index d6a0cbd6a..636a79860 100644 --- a/mach/moon3/ncg/mach.c +++ b/mach/moon3/ncg/mach.c @@ -208,6 +208,11 @@ mes(type) word type ; { argt = getarg(cst_ptyp); a2 = argval; argt = getarg(cst_ptyp|nof_ptyp|sof_ptyp|ilb_ptyp|pro_ptyp); +#ifdef DBX + if (a1 == N_PSYM) { + argval += 8; + } +#endif fprintf(codefile, "%s, 0x%x, %d\n", strarg(argt), a1, a2); argt = getarg(end_ptyp); break; @@ -219,6 +224,7 @@ mes(type) word type ; { argt = getarg(cst_ptyp); } swtxt(); +#ifndef DBX if (argval == N_SLINE) { #ifdef TBL68020 fputs("jsr (___u_LiB)\n", codefile); @@ -227,6 +233,7 @@ mes(type) word type ; { #endif cleanregs(); /* debugger might change variables */ } +#endif fprintf(codefile, ".symd \"%s\", 0x%x,", str, (int) argval); argt = getarg(cst_ptyp); fprintf(codefile, "%d\n", (int) argval); -- 2.34.1