| 712 | } |
| 713 | |
| 714 | void showMicrocodeExplorer(mbl_array_t* mba, bool keepMba, const char* name) |
| 715 | { |
| 716 | qstring title; |
| 717 | TWidget* widget = NULL; |
| 718 | int cnt = 0; |
| 719 | do { |
| 720 | qstring suffix; |
| 721 | if (cnt++ > 0) |
| 722 | suffix.sprnt(" (%d)", cnt); |
| 723 | if (cnt > 3) |
| 724 | return; |
| 725 | title.sprnt("Microcode - %a - %s%s", mba->entry_ea, name, suffix.c_str()); |
| 726 | widget = find_widget(title.c_str()); |
| 727 | } while (widget); |
| 728 | sample_info_t* si = new sample_info_t(mba, keepMba, name); |
| 729 | |
| 730 | simpleline_place_t s1; |
| 731 | simpleline_place_t s2((int)si->md.lines.size() - 1); |
| 732 | |
| 733 | si->cv = create_custom_viewer( |
| 734 | title.c_str(), // title |
| 735 | &s1, // minplace |
| 736 | &s2, // maxplace |
| 737 | &s1, // curplace |
| 738 | NULL, // renderer_info_t *rinfo |
| 739 | &si->md.lines, // ud |
| 740 | &handlers, // cvhandlers |
| 741 | si, // cvhandlers_ud |
| 742 | NULL); // parent |
| 743 | |
| 744 | #if IDA_SDK_VERSION < 920 |
| 745 | hook_to_notification_point(HT_UI, ui_callback, si); |
| 746 | #else |
| 747 | hook_event_listener(HT_UI, si, nullptr); |
| 748 | #endif //IDA_SDK_VERSION < 920 |
| 749 | display_widget(si->cv, WOPN_DP_TAB | WOPN_NOT_CLOSED_BY_ESC, "IDA View-A"); |
| 750 | } |
| 751 | |
| 752 | void ShowMicrocodeExplorer(mbl_array_t* mba, const char* fmt, ...) |
| 753 | { |
no test coverage detected