ghostscope-dwarf 0.1.4

DWARF parser and symbolizer used by GhostScope to resolve variables and types at runtime.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#[inline]
pub(crate) fn range_contains_pc(lo: u64, hi: u64, pc: u64) -> bool {
    if lo == hi {
        pc == lo
    } else {
        pc >= lo && pc < hi
    }
}

#[inline]
pub(crate) fn ranges_contain_pc(ranges: &[(u64, u64)], pc: u64) -> bool {
    ranges.iter().any(|&(lo, hi)| range_contains_pc(lo, hi, pc))
}