Some bugfixes, apparently a new bug.
git-svn-id: http://www.cdkersey.com/harp/harptool@112 0246edb2-e076-4747-b392-db732a341fa2
This commit is contained in:
23
src/include/debug.h
Normal file
23
src/include/debug.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*******************************************************************************
|
||||
HARPtools by Chad D. Kersey, Spring 2013
|
||||
*******************************************************************************/
|
||||
#ifndef __DEBUG_H
|
||||
#define __DEBUG_H
|
||||
|
||||
#ifdef USE_DEBUG
|
||||
#include <iostream>
|
||||
|
||||
#define D(lvl, x) do { \
|
||||
using namespace std; \
|
||||
if ((lvl) <= USE_DEBUG) { \
|
||||
cout << "DEBUG " << __FILE__ << ':' << dec << __LINE__ << ": " \
|
||||
<< x << endl; \
|
||||
} \
|
||||
} while(0)
|
||||
#else
|
||||
|
||||
#define D(lvl, x) do {} while(0)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -4,6 +4,7 @@
|
||||
#ifndef __MEM_H
|
||||
#define __MEM_H
|
||||
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
#include <map>
|
||||
|
||||
@@ -80,7 +80,9 @@ namespace Harp {
|
||||
|
||||
return;
|
||||
noFit:
|
||||
std::cout << "Attempt to bind a symbol to an address it cannot reach.\n";
|
||||
std::cout << "Attempt to bind a " << bits << "-bit "
|
||||
<< (relative?"":"non-") << "relative symbol to an address"
|
||||
" it cannot reach.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user