| 21 | |
| 22 | template <typename T> |
| 23 | void list_cmd_handler(const ACE_scanner<T> *scanner, size_t list_max_count) { |
| 24 | const match_storage<T> &scan_res = scanner->get_current_scan_result(); |
| 25 | |
| 26 | size_t display_count = std::min(list_max_count, scan_res.get_matches_count()); |
| 27 | |
| 28 | scan_res.iterate_val( |
| 29 | |
| 30 | [&](ADDR addr, T val) { |
| 31 | T val_display = val; |
| 32 | // swap endian again if scan type is swapped |
| 33 | // for a good normal (as in the endian is native )display |
| 34 | if (scanner->get_endian_scan_type() == E_endian_scan_type::swapped) |
| 35 | val_display = swap_endian<T>(val); |
| 36 | // |
| 37 | |
| 38 | frontend_print("0x%llx %s\n", addr, |
| 39 | std::to_string(val_display).c_str()); |
| 40 | }, |
| 41 | |
| 42 | display_count |
| 43 | |
| 44 | ); |
| 45 | } |
| 46 | |
| 47 | template <typename T> |
| 48 | void matchcount_cmd_handler(const ACE_scanner<T> *scanner) { |
nothing calls this directly
no test coverage detected