Trait twizzler_runtime_api::DebugRuntime
source · pub trait DebugRuntime {
// Required methods
fn get_library(&self, id: LibraryId) -> Option<Library>;
fn get_exeid(&self) -> Option<LibraryId>;
fn get_library_segment(
&self,
lib: &Library,
seg: usize
) -> Option<AddrRange>;
fn get_full_mapping(&self, lib: &Library) -> Option<ObjectHandle>;
fn iterate_phdr(&self, f: &mut dyn FnMut(DlPhdrInfo) -> c_int) -> c_int;
// Provided method
fn next_library_id(&self, id: LibraryId) -> Option<LibraryId> { ... }
}
Expand description
Functions for the debug support part of libstd (e.g. unwinding, backtracing).
Required Methods§
sourcefn get_library(&self, id: LibraryId) -> Option<Library>
fn get_library(&self, id: LibraryId) -> Option<Library>
Gets a handle to a library given the ID.
sourcefn get_exeid(&self) -> Option<LibraryId>
fn get_exeid(&self) -> Option<LibraryId>
Returns the ID of the main executable, if there is one.
sourcefn get_library_segment(&self, lib: &Library, seg: usize) -> Option<AddrRange>
fn get_library_segment(&self, lib: &Library, seg: usize) -> Option<AddrRange>
Get a segment of a library, if the segment index exists. All segment IDs are indexes, so they range from [0, N).
sourcefn get_full_mapping(&self, lib: &Library) -> Option<ObjectHandle>
fn get_full_mapping(&self, lib: &Library) -> Option<ObjectHandle>
Get the full mapping of the underlying library.
sourcefn iterate_phdr(&self, f: &mut dyn FnMut(DlPhdrInfo) -> c_int) -> c_int
fn iterate_phdr(&self, f: &mut dyn FnMut(DlPhdrInfo) -> c_int) -> c_int
Handler for calls to the dl_iterate_phdr call.
Provided Methods§
sourcefn next_library_id(&self, id: LibraryId) -> Option<LibraryId>
fn next_library_id(&self, id: LibraryId) -> Option<LibraryId>
Get the library ID immediately following the given one.