| 74 | } |
| 75 | |
| 76 | inline uintptr_t get_own_proc_addr_base(const void* addr) { |
| 77 | std::ifstream maps_file("/proc/self/maps"); |
| 78 | for (std::string line; std::getline(maps_file, line); ) { |
| 79 | const mapping_entry_t mapping = parse_proc_maps_line(line); |
| 80 | if (mapping.contains_addr(addr)) { |
| 81 | return mapping.start - mapping.offset_from_base; |
| 82 | } |
| 83 | } |
| 84 | return 0; |
| 85 | } |
| 86 | |
| 87 | }}} // namespace boost::stacktrace::detail |
| 88 |
no test coverage detected