void dump_lsymbols(void) { unsigned char *s, length; short type; unsigned short i, j, start_block, end_block; unsigned value; char b[256]; start_block = gp_getu16(&main_dir->dir[COD_DIR_LSYMTAB]); if (start_block != 0) { end_block = gp_getu16(&main_dir->dir[COD_DIR_LSYMTAB + 2]); end_block = gp_getu16(&main_dir->dir[COD_DIR_LSYMTAB + 2]); printf("Long Symbol Table Information:\n" "------------------------------\n"); for (j = start_block; j <= end_block; j++) { read_block(temp, j); for (i = 0; i < COD_BLOCK_SIZE; ) { s = &temp[i]; if (*s == 0) { break; } length = *s; type = gp_getl16(&s[length + 1]); if (type > 128) { type = 0; } /* read big endian */ value = gp_getb32(&s[length + 3]); printf("%s = %x, type = %s\n", substr(b, sizeof(b), &s[1], length), value, SymbolType4[type]); i += length + 7; } } } else { printf("No long symbol table info.\n"); } putchar('\n'); }
void dump_message_area(void) { char DebugType, DebugMessage[MAX_STRING_LEN]; unsigned short i, j, start_block, end_block; unsigned short laddress; start_block = gp_getu16(&main_dir->dir[COD_DIR_MESSTAB]); if (start_block != 0) { end_block = gp_getu16(&main_dir->dir[COD_DIR_MESSTAB + 2]); printf("Debug Message area:\n" " Addr Cmd Message\n" " -------- --- -------------------------------------\n"); for (i = start_block; i <= end_block; i++) { read_block(temp, i); j = 0; while (j < 504) { /* read big endian */ laddress = gp_getb32(&temp[j]); j += 4; DebugType = temp[j++]; if (DebugType == 0) { break; } substr(DebugMessage, sizeof(DebugMessage), &temp[j], MAX_STRING_LEN); j += strlen(DebugMessage); printf(" %8x %c %s\n", laddress, DebugType, DebugMessage); } } } else { printf("No Debug Message information available.\n"); } putchar('\n'); }
void dump_lsymbols( void ) { char *s,length; short type; int i,j,start_block,end_block, value; char b[256]; start_block = gp_getl16(&directory_block_data[COD_DIR_LSYMTAB]); if(start_block) { end_block = gp_getl16(&directory_block_data[COD_DIR_LSYMTAB+2]); printf("\nLong Symbol Table Information\n"); printf("------------------------\n\n"); for(j=start_block; j<=end_block; j++) { read_block(temp, j); for(i=0; i<COD_BLOCK_SIZE;) { s = &temp[i]; if(*s==0) break; length = *s; type = *(short *)&s[length+1]; if(type>128) type = 0; /* read big endian */ value = gp_getb32(&s[length+3]); printf("%s = %x, type = %s\n", substr(b,&s[1],length), value, SymbolType4[type]); i += (length + 7); } } }else printf("No long symbol table info\n"); }
void dump_message_area(void) { char DebugType,DebugMessage[64]; int i,j,start_block,end_block; int laddress; j=0; start_block = gp_getl16(&directory_block_data[COD_DIR_MESSTAB]); if(start_block) { end_block = gp_getl16(&directory_block_data[COD_DIR_MESSTAB+2]); printf("\n\nDebug Message area\n"); printf("------------------\n\n"); for(i=start_block; i<=end_block; i++) { read_block(temp, i); while (j < 504) { if (temp[j + 6] == 0) { j = 512; /* done */ break; } /* read big endian */ laddress = gp_getb32(&temp[j]); DebugType = temp[j++]; substr(DebugMessage,&temp[j],64); j += strlen(DebugMessage); printf("%8x %2d %s\n",laddress, DebugType, DebugMessage); } } } else printf(" No Debug Message information available.\n"); }