summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/loader/ecoff_object.cc12
-rw-r--r--sim/debug.cc6
-rw-r--r--sim/debug.hh4
3 files changed, 10 insertions, 12 deletions
diff --git a/base/loader/ecoff_object.cc b/base/loader/ecoff_object.cc
index bab75944d..714f1d7b8 100644
--- a/base/loader/ecoff_object.cc
+++ b/base/loader/ecoff_object.cc
@@ -108,14 +108,14 @@ EcoffObject::loadGlobalSymbols(SymbolTable *symtab)
return false;
if (fileHdr->f_magic != ECOFF_MAGIC_ALPHA) {
- cprintf("wrong magic\n");
+ warn("loadGlobalSymbols: wrong magic on %s\n", filename);
return false;
}
ecoff_symhdr *syms = (ecoff_symhdr *)(fileData + fileHdr->f_symptr);
if (syms->magic != magicSym2) {
- cprintf("bad symbol header magic\n");
- exit(1);
+ warn("loadGlobalSymbols: bad symbol header magic on %s\n", filename);
+ return false;
}
ecoff_extsym *ext_syms = (ecoff_extsym *)(fileData + syms->cbExtOffset);
@@ -137,14 +137,14 @@ EcoffObject::loadLocalSymbols(SymbolTable *symtab)
return false;
if (fileHdr->f_magic != ECOFF_MAGIC_ALPHA) {
- cprintf("wrong magic\n");
+ warn("loadGlobalSymbols: wrong magic on %s\n", filename);
return false;
}
ecoff_symhdr *syms = (ecoff_symhdr *)(fileData + fileHdr->f_symptr);
if (syms->magic != magicSym2) {
- cprintf("bad symbol header magic\n");
- exit(1);
+ warn("loadGlobalSymbols: bad symbol header magic on %s\n", filename);
+ return false;
}
ecoff_sym *local_syms = (ecoff_sym *)(fileData + syms->cbSymOffset);
diff --git a/sim/debug.cc b/sim/debug.cc
index 293edcbe2..3467d1669 100644
--- a/sim/debug.cc
+++ b/sim/debug.cc
@@ -40,13 +40,15 @@
using namespace std;
-#ifdef DEBUG
void
debug_break()
{
+#ifndef NDEBUG
kill(getpid(), SIGTRAP);
-}
+#else
+ cprintf("debug_break suppressed, compiled with NDEBUG\n");
#endif
+}
//
// Debug event: place a breakpoint on the process function and
diff --git a/sim/debug.hh b/sim/debug.hh
index 3ccf1dbd4..5ee77cf28 100644
--- a/sim/debug.hh
+++ b/sim/debug.hh
@@ -29,10 +29,6 @@
#ifndef __DEBUG_HH__
#define __DEBUG_HH__
-#ifdef DEBUG
void debug_break();
-#else
-inline void debug_break() { }
-#endif
#endif // __DEBUG_HH__