URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 1649 to Rev 1650
- ↔ Reverse comparison
Rev 1649 → Rev 1650
/trunk/or1ksim/cpu/common/parse.c
44,6 → 44,8
#include "labels.h" |
#include "debug.h" |
|
DECLARE_DEBUG_CHANNEL(coff) |
|
#define MEMORY_LEN 0x100000000 |
#define MAXLINE_LEN 18000 |
|
325,7 → 327,7
|
/* loading section */ |
freemem = COFF_LONG_H(coffscnhdr.s_paddr); |
debug(2,"Starting to load at 0x%x\n", freemem); |
TRACE_(coff)("Starting to load at 0x%x\n", freemem); |
if (fseek(inputfs, COFF_LONG_H(coffscnhdr.s_scnptr), SEEK_SET) == -1) { |
fclose(inputfs); |
perror("readfile_coff"); |
337,10 → 339,10
if (len == 2) |
{ |
fseek(inputfs, -2, SEEK_CUR); |
debug(8,"readfile_coff: %"PRIx32" 0x%x \n", sectsize, insn >> 16); |
TRACE_(coff)("readfile_coff: %"PRIx32" 0x%x \n", sectsize, insn >> 16); |
} |
else |
debug(8,"readfile_coff: %"PRIx32" 0x%x \n", sectsize, insn); |
TRACE_(coff)("readfile_coff: %"PRIx32" 0x%x \n", sectsize, insn); |
addprogram (freemem, insn, &breakpoint); |
sectsize -= len; |
} |
399,7 → 401,7
if (*((uint32_t *)coffsymhdr.e.e.e_zeroes)) { |
if (strlen(coffsymhdr.e.e_name) && strlen(coffsymhdr.e.e_name) < 9) |
add_label(COFF_LONG_H(coffsymhdr.e_value), coffsymhdr.e.e_name); |
debug(8, "[%i] Symbol: %s,", count++, coffsymhdr.e.e_name); |
TRACE_(coff)("[%i] Symbol: %s,", count++, coffsymhdr.e.e_name); |
} else { |
uint32_t fpos = ftell (inputfs); |
|
409,13 → 411,14
if ((*(s++) = fgetc(inputfs)) == 0) break; |
tmp[32] = 0; |
add_label(COFF_LONG_H(coffsymhdr.e_value), &tmp[0]); |
debug(8, "[%i] Symbol: %s,", count++, &tmp[0]); |
TRACE_(coff)("[%i] Symbol: %s,", count++, &tmp[0]); |
} |
fseek(inputfs, fpos, SEEK_SET); |
} |
|
debug(9, " val: 0x%.8lx,", COFF_LONG_H(coffsymhdr.e_value)); |
debug(9, " type: %x, %x, auxs: %i\n", COFF_SHORT_H(coffsymhdr.e_type), *((unsigned short *)coffsymhdr.e_type), n); |
TRACE_(coff)(" val: 0x%.8lx,", COFF_LONG_H(coffsymhdr.e_value)); |
TRACE_(coff)(" type: %x, %x, auxs: %i\n", COFF_SHORT_H(coffsymhdr.e_type), |
*((unsigned short *)coffsymhdr.e_type), n); |
} |
|
for (i = 0; i < n; i++) |
586,16 → 589,8
|
while (sectsize > 0 && (len = fread(&inputbuf, sizeof(inputbuf), 1, inputfs))) { |
insn = ELF_LONG_H(inputbuf); |
len = insn_len (insn_decode (insn)); |
if (len == 2) |
{ |
fseek(inputfs, -2, SEEK_CUR); |
debug(8, "readfile_elf: %x 0x%x \n", sectsize, insn >> 16); |
} |
else |
debug(8, "readfile_elf: %x 0x%x \n", sectsize, insn); |
addprogram (freemem, insn, &breakpoint); |
sectsize -= len; |
sectsize -= 4; |
} |
} |
} |
605,7 → 600,6
while(syms--) { |
if (sym_tbl[i].st_name && sym_tbl[i].st_info && ELF_SHORT_H(sym_tbl[i].st_shndx) < 0x8000) { |
add_label(ELF_LONG_H(sym_tbl[i].st_value), &str_tbl[ELF_LONG_H(sym_tbl[i].st_name)]); |
debug (8, "%08lx(%s): %x %x %x\n", ELF_LONG_H(sym_tbl[i].st_value), &str_tbl[ELF_LONG_H(sym_tbl[i].st_name)], sym_tbl[i].st_info, sym_tbl[i].st_other, ELF_SHORT_H(sym_tbl[i].st_shndx)); |
} |
i++; |
} |
/trunk/or1ksim/support/dbchs.h
38,3 → 38,4
DECLARE_DEBUG_CHANNEL(vapi) |
DECLARE_DEBUG_CHANNEL(simprintf) |
DECLARE_DEBUG_CHANNEL(jtag) |
DECLARE_DEBUG_CHANNEL(coff) |