public HunkFile() { this.type = FileType.TYPE_UNKNOWN; this.hunks = new List<Hunk>(); this.header = null; this.segments = new List<List<Hunk>>(); this.overlay = null; this.overlay_headers = null; this.overlay_segments = null; this.libs = null; this.units = null; }
public virtual void show_extra_hunk(Hunk hunk) { var hunk_type = hunk.HunkType; if (HunkFileParser.reloc_hunks.Contains(hunk_type)) { var type_name = hunk.HunkType.ToString().Replace("HUNK_", "").ToLower(); var rhunk = (RelocHunk) hunk; this.print_extra("reloc", String.Format("{0} #{1}", type_name, rhunk.reloc.Count)); if (!this.brief) { this.show_reloc_hunk(rhunk); } } else if (hunk_type == HunkType.HUNK_DEBUG) { var dhunk = (DebugHunk) hunk; this.print_extra("debug", String.Format("{0} offset={1:X8}", dhunk.debug_type, dhunk.debug_offset)); if (!this.brief) { this.show_debug_hunk(dhunk); } } else if (hunk_type == HunkType.HUNK_SYMBOL) { var shunk = (SymbolHunk) hunk; this.print_extra("symbol", String.Format("#{0}", shunk.symbols)); if (!this.brief) { this.show_symbol_hunk(shunk); } } else if (hunk_type == HunkType.HUNK_EXT) { var ehunk = (ExtHunk) hunk; this.print_extra("ext", String.Format("def #{0} ref #{1} common #{2}", ehunk.ext_def.Count, ehunk.ext_ref.Count, ehunk.ext_common.Count)); if (!this.brief) { this.show_ext_hunk(ehunk); } } else { this.print_extra("extra", String.Format("{0}", hunk.HunkType)); } }