FlAsmView::FlAsmView( ui::Controller& controller, const Symbol& sym ) : base_type(controller, 0, 0, 0, 0) { const char* fname = basename(sym.file()->c_str()); widget()->copy_label(fname); widget()->set_listing(this); set_event_callback(this, widget()); }
static void print(ostream& out, const Symbol& sym) { out << sym.file(); if (sym.line()) { out << ':' << sym.line(); } else { out << ' ' << sym.demangled_name(false); out << "+0x" << hex << sym.offset() << dec; } }
RefPtr<ui::CodeView> FlMultiCodeView::make_view(const Symbol& sym) { RefPtr<ui::CodeView> view; if (sym.line() == 0) // no source code? { view = new FlAsmView(controller(), sym); } else { const char* fname = basename(sym.file()->c_str()); view = new FlSourceView(controller(), fname); } return view; }