MCPcopy Index your code
hub / github.com/encounter/objdiff / decode_extab

Function decode_extab

objdiff-gui/src/views/extab_diff.rs:8–26  ·  view source on GitHub ↗
(extab: &ExceptionInfo)

Source from the content-addressed store, hash-verified

6use crate::views::{appearance::Appearance, function_diff::FunctionDiffContext};
7
8fn decode_extab(extab: &ExceptionInfo) -> String {
9 let mut text = String::from("");
10
11 let mut dtor_names: Vec<String> = vec![];
12 for dtor in &extab.dtors {
13 //For each function name, use the demangled name by default,
14 //and if not available fallback to the original name
15 let name: String = match &dtor.demangled_name {
16 Some(demangled_name) => demangled_name.to_string(),
17 None => dtor.name.clone(),
18 };
19 dtor_names.push(name);
20 }
21 if let Some(decoded) = extab.data.to_string(dtor_names) {
22 text += decoded.as_str();
23 }
24
25 text
26}
27
28fn find_extab_entry(obj: &Object, symbol_index: usize) -> Option<&ExceptionInfo> {
29 (obj.arch.as_ref() as &dyn Any)

Callers 2

extab_text_uiFunction · 0.85
decode_exception_infoFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected