Line 45... |
Line 45... |
int breakpoint = 0;
|
int breakpoint = 0;
|
|
|
fmtaddr = regparam;
|
fmtaddr = regparam;
|
|
|
i = 0;
|
i = 0;
|
while (eval_mem8(fmtaddr,&breakpoint) != '\0') {
|
while (eval_direct8(fmtaddr,&breakpoint) != '\0') {
|
fmtstr[i++] = eval_mem8(fmtaddr,&breakpoint);
|
fmtstr[i++] = eval_direct8(fmtaddr,&breakpoint);
|
fmtaddr++;
|
fmtaddr++;
|
if (i == FMTLEN - 1)
|
if (i == FMTLEN - 1)
|
break;
|
break;
|
}
|
}
|
fmtstr[i] = '\0';
|
fmtstr[i] = '\0';
|
Line 91... |
Line 91... |
if (strstr(fmtstrpart, "%")) {
|
if (strstr(fmtstrpart, "%")) {
|
char *tmp;
|
char *tmp;
|
int string = 0;
|
int string = 0;
|
debug(6, " 3");
|
debug(6, " 3");
|
#if STACK_ARGS
|
#if STACK_ARGS
|
arg = eval_mem32(argaddr,&breakpoint);
|
arg = eval_direct32(argaddr,&breakpoint);
|
argaddr += 4;
|
argaddr += 4;
|
#else
|
#else
|
{
|
{
|
unsigned char regstr[5];
|
unsigned char regstr[5];
|
|
|
Line 111... |
Line 111... |
if (*tmp == 's') string = 1;
|
if (*tmp == 's') string = 1;
|
}
|
}
|
if (string) {
|
if (string) {
|
int len = 0;
|
int len = 0;
|
char *str;
|
char *str;
|
for(; eval_mem8(arg++,&breakpoint); len++);
|
for(; eval_direct8(arg++,&breakpoint); len++);
|
len++; /* for null char */
|
len++; /* for null char */
|
arg -= len;
|
arg -= len;
|
str = (char *)malloc(len);
|
str = (char *)malloc(len);
|
len = 0;
|
len = 0;
|
for(; eval_mem8(arg,&breakpoint); len++)
|
for(; eval_direct8(arg,&breakpoint); len++)
|
*(str+len) = eval_mem8(arg++,&breakpoint);
|
*(str+len) = eval_direct8(arg++,&breakpoint);
|
*(str+len) = eval_mem8(arg,&breakpoint); /* null ch */
|
*(str+len) = eval_direct8(arg,&breakpoint); /* null ch */
|
debug(6, "4a: len=%d str=%s\n", len, str);
|
debug(6, "4a: len=%d str=%s\n", len, str);
|
debug(6, "4b:");
|
debug(6, "4b:");
|
fprintf(f, fmtstrpart, str);
|
fprintf(f, fmtstrpart, str);
|
if (tee_exe_log) fprintf(runtime.sim.fexe_log, fmtstrpart, str);
|
if (tee_exe_log) fprintf(runtime.sim.fexe_log, fmtstrpart, str);
|
free(str);
|
free(str);
|