int handle_64(char *ptr, int nb) { unsigned int i; struct mach_header_64 *header; struct load_command *lc; struct symtab_command *sym; t_type *type; header = (struct mach_header_64 *)ptr; lc = (void*)ptr + sizeof(*header); i = 0; type = NULL; while (i < header->ncmds) { if (lc->cmd == LC_SEGMENT_64) type = fill_types((struct segment_command_64 *)lc, lc, type, nb); else if (lc->cmd == LC_SYMTAB) { sym = (struct symtab_command *)lc; print_64(sym, ptr, type); break ; } lc = (void *)lc + lc->cmdsize; ++i; } return (1); }
void dump_range(FILE *f, struct afu *afu, int lwr, int upr) { uint64_t r; fprintf(f,"# mmio address range 0x%07x to 0x%07x\n",lwr, upr); while (lwr < upr) { // skip heartbeat reg otherwise mserv reports a mismatch if( lwr != 0x2010020 ) { afu_mmio_read_dw(afu,(lwr >> 2),(__u64 *)&r); print_64(f,lwr,r); } lwr+=8; }