OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [rel-0-3-0-rc1/] [or1ksim/] [support/] [debug.c] - Diff between revs 1389 and 1522

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1389 Rev 1522
Line 19... Line 19...
 
 
#include <stdio.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdarg.h>
#include <string.h>
#include <string.h>
 
 
 
#include "config.h"
 
 
 
#ifdef HAVE_INTTYPES_H
 
#include <inttypes.h>
 
#endif
 
 
 
#include "port.h"
 
#include "arch.h"
 
#include "sim-config.h"
 
 
#define __ORSIM_NO_DEC_DBCH
#define __ORSIM_NO_DEC_DBCH
#include "debug.h"
#include "debug.h"
 
 
#define DECLARE_DEBUG_CHANNEL(dbch) char __orsim_dbch_##dbch[] = "\0"#dbch;
#define DECLARE_DEBUG_CHANNEL(dbch) char __orsim_dbch_##dbch[] = "\0"#dbch;
#include "dbchs.h"
#include "dbchs.h"
Line 43... Line 53...
  static int last_lf = 1; /* There *has* to be a better way */
  static int last_lf = 1; /* There *has* to be a better way */
 
 
  if(!(dbch[0] & (1 << dbcl)))
  if(!(dbch[0] & (1 << dbcl)))
    return;
    return;
 
 
  if(last_lf)
  if(last_lf)  {
 
    if(!TRACE_ON(cycles))
    fprintf(stderr, "%s:%s:%s: ", debug_classes[dbcl], dbch + 1, function);
    fprintf(stderr, "%s:%s:%s: ", debug_classes[dbcl], dbch + 1, function);
 
    else
 
      fprintf(stderr, "%lld:%s:%s:%s: ", runtime.sim.cycles,
 
              debug_classes[dbcl], dbch + 1, function);
 
  }
  last_lf = format[strlen(format) - 1] == '\n'; /* This is wrong... */
  last_lf = format[strlen(format) - 1] == '\n'; /* This is wrong... */
  va_start(ap, format);
  va_start(ap, format);
  vfprintf(stderr, format, ap);
  vfprintf(stderr, format, ap);
  va_end(ap);
  va_end(ap);
}
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.