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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_1_x/] [or1ksim/] [support/] [simprintf.c] - Diff between revs 1265 and 1308

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

Rev 1265 Rev 1308
Line 24... Line 24...
 
 
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <errno.h>
#include <errno.h>
#include <stdarg.h>
#include <stdarg.h>
 
#include <stdlib.h>
 
 
#include <abstract.h>
#include "abstract.h"
#include <arch.h>
#include "arch.h"
#include "sim-config.h"
#include "sim-config.h"
 
#include "debug.h"
 
 
/* Length of PRINTF format string */
/* Length of PRINTF format string */
#define FMTLEN 2000
#define FMTLEN 2000
 
 
char fmtstr[FMTLEN];
char fmtstr[FMTLEN];
 
 
char *simgetstr(unsigned long stackaddr, unsigned long regparam)
char *simgetstr(unsigned long stackaddr, unsigned long regparam)
{
{
  unsigned long fmtaddr;
  unsigned long fmtaddr;
  FILE *f;
 
  int i;
  int i;
  int breakpoint = 0;
  int breakpoint = 0;
 
 
  fmtaddr = regparam;
  fmtaddr = regparam;
 
 
Line 57... Line 58...
  return fmtstr;
  return fmtstr;
}
}
 
 
void simprintf(unsigned long stackaddr, unsigned long regparam)
void simprintf(unsigned long stackaddr, unsigned long regparam)
{
{
  unsigned long fmtaddr;
 
  FILE *f;
  FILE *f;
  int i = 0;
 
  int breakpoint = 0;
  int breakpoint = 0;
 
 
  simgetstr(stackaddr, regparam);
  simgetstr(stackaddr, regparam);
 
 
  debug(6, "simprintf: stackaddr: 0x%.8lx\n", stackaddr);
  debug(6, "simprintf: stackaddr: 0x%.8lx\n", stackaddr);
  if ((f = fopen(config.sim.fstdout, "a+"))) {
  if ((f = fopen(config.sim.fstdout, "a+"))) {
    unsigned long arg;
    unsigned long arg;
    unsigned long argaddr;
    unsigned long argaddr;
    unsigned char regstr[5];
 
    char *fmtstrend;
    char *fmtstrend;
    char *fmtstrpart = fmtstr;
    char *fmtstrpart = fmtstr;
    int tee_exe_log;
    int tee_exe_log;
 
 
#if STACK_ARGS
#if STACK_ARGS

powered by: WebSVN 2.1.0

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