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:
chad
2013-01-15 23:16:10 +00:00
parent 6b41d25530
commit 77793a1dbb
10 changed files with 95 additions and 45 deletions

23
src/include/debug.h Normal file
View 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

View File

@@ -4,6 +4,7 @@
#ifndef __MEM_H
#define __MEM_H
#include <ostream>
#include <vector>
#include <queue>
#include <map>

View File

@@ -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);
}