mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-13 08:26:02 +00:00
Put DEBUG_OUTPUT at the top along with TRACE_LEVEL. Also fix the code
inside DEBUG_OUTPUT so that it compiles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9614 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
// Enable to trace to figure out what the heck is going on when parsing fails
|
// Enable to trace to figure out what the heck is going on when parsing fails
|
||||||
//#define TRACE_LEVEL 10
|
//#define TRACE_LEVEL 10
|
||||||
|
//#define DEBUG_OUTPUT
|
||||||
|
|
||||||
#if TRACE_LEVEL // ByteCodeReading_TRACEr
|
#if TRACE_LEVEL // ByteCodeReading_TRACEr
|
||||||
#define BCR_TRACE(n, X) \
|
#define BCR_TRACE(n, X) \
|
||||||
@@ -215,10 +216,10 @@ static const std::string Error_DestSlot = "No destination slot found.";
|
|||||||
static inline void readBlock(const unsigned char *&Buf,
|
static inline void readBlock(const unsigned char *&Buf,
|
||||||
const unsigned char *EndBuf,
|
const unsigned char *EndBuf,
|
||||||
unsigned &Type, unsigned &Size) {
|
unsigned &Type, unsigned &Size) {
|
||||||
#if DEBUG_OUTPUT
|
#ifdef DEBUG_OUTPUT
|
||||||
bool Result = read(Buf, EndBuf, Type) || read(Buf, EndBuf, Size);
|
bool Result = read(Buf, EndBuf, Type) || read(Buf, EndBuf, Size);
|
||||||
std::cerr << "StartLoc = " << ((unsigned)Buf & 4095)
|
std::cerr << "StartLoc = " << ((unsigned)Buf & 4095)
|
||||||
<< " Type = " << Type << " Size = " << Size << endl;
|
<< " Type = " << Type << " Size = " << Size << std::endl;
|
||||||
if (Result) throw Error_read;
|
if (Result) throw Error_read;
|
||||||
#else
|
#else
|
||||||
if (read(Buf, EndBuf, Type) || read(Buf, EndBuf, Size)) throw Error_read;
|
if (read(Buf, EndBuf, Type) || read(Buf, EndBuf, Size)) throw Error_read;
|
||||||
|
Reference in New Issue
Block a user