Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(debuginfo): Expose binary names for ELF and MachO #252

Merged
merged 2 commits into from
Jul 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions debuginfo/src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ impl<'d> ElfObject<'d> {
.map(|slice| CodeId::from_binary(slice))
}

/// The binary's soname, if any.
pub fn soname(&self) -> Option<&'d str> {
calixteman marked this conversation as resolved.
Show resolved Hide resolved
self.elf.soname
}

/// The debug information identifier of an ELF object.
///
/// The debug identifier is a rehash of the first 16 bytes of the `code_id`, if
Expand Down
5 changes: 5 additions & 0 deletions debuginfo/src/macho.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ impl<'d> MachObject<'d> {
None
}

/// The name of the dylib if any.
pub fn name(&self) -> Option<&'d str> {
self.macho.name
}

/// The code identifier of this object.
///
/// Mach objects use a UUID which is specified in the load commands that are part of the Mach
Expand Down