diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4330d2f8..a9685b56 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,7 +57,7 @@ jobs: # Starting with Ubuntu 22.04 libc6-dbg is needed. - name: Install libc debug info - run: sudo apt-get install -y libc6-dbg + run: sudo apt-get update && sudo apt-get install -y libc6-dbg shell: bash if: contains(matrix.os, 'ubuntu-24.04') diff --git a/src/symbolize/gimli.rs b/src/symbolize/gimli.rs index 31b83b51..ec56dcd4 100644 --- a/src/symbolize/gimli.rs +++ b/src/symbolize/gimli.rs @@ -223,6 +223,7 @@ cfg_if::cfg_if! { target_os = "linux", target_os = "fuchsia", target_os = "freebsd", + target_os = "haiku", target_os = "hurd", target_os = "openbsd", target_os = "netbsd", @@ -238,9 +239,6 @@ cfg_if::cfg_if! { } else if #[cfg(target_env = "libnx")] { mod libs_libnx; use libs_libnx::native_libraries; - } else if #[cfg(target_os = "haiku")] { - mod libs_haiku; - use libs_haiku::native_libraries; } else if #[cfg(target_os = "aix")] { mod libs_aix; use libs_aix::native_libraries; diff --git a/src/symbolize/gimli/libs_haiku.rs b/src/symbolize/gimli/libs_haiku.rs deleted file mode 100644 index ddfd6b47..00000000 --- a/src/symbolize/gimli/libs_haiku.rs +++ /dev/null @@ -1,50 +0,0 @@ -// Haiku implements the image_info struct and the get_next_image_info() -// functions to iterate through the loaded executable images. The -// image_info struct contains a pointer to the start of the .text -// section within the virtual address space, as well as the size of -// that section. All the read-only segments of the ELF-binary are in -// that part of the address space. - -use super::mystd::ffi::OsStr; -use super::mystd::os::unix::prelude::*; -use super::{Library, LibrarySegment}; -use alloc::borrow::ToOwned; -use alloc::vec::Vec; -use core::ffi::CStr; -use core::mem::MaybeUninit; - -pub(super) fn native_libraries() -> Vec { - let mut libraries: Vec = Vec::new(); - - unsafe { - let mut info = MaybeUninit::::zeroed(); - let mut cookie: i32 = 0; - // Load the first image to get a valid info struct - let mut status = - libc::get_next_image_info(libc::B_CURRENT_TEAM, &mut cookie, info.as_mut_ptr()); - if status != libc::B_OK { - return libraries; - } - let mut info = info.assume_init(); - - while status == libc::B_OK { - let mut segments = Vec::new(); - segments.push(LibrarySegment { - stated_virtual_memory_address: 0, - len: info.text_size as usize, - }); - - let bytes = CStr::from_ptr(info.name.as_ptr()).to_bytes(); - let name = OsStr::from_bytes(bytes).to_owned(); - libraries.push(Library { - name: name, - segments: segments, - bias: info.text as usize, - }); - - status = libc::get_next_image_info(libc::B_CURRENT_TEAM, &mut cookie, &mut info); - } - } - - libraries -} diff --git a/tests/current-exe-mismatch.rs b/tests/current-exe-mismatch.rs index d99c574a..a1f7a31c 100644 --- a/tests/current-exe-mismatch.rs +++ b/tests/current-exe-mismatch.rs @@ -12,10 +12,11 @@ use std::process::Command; mod common; fn main() { - if cfg!(target_os = "netbsd") { - // NetBSD doesn't support this silliness, so because this is an fn main test, - // just pass it on there. If we used ui-test or something we'd use + if cfg!(target_os = "netbsd") || cfg!(target_os = "haiku") { + // NetBSD and Haiku don't support this silliness, so because this is an fn main + // test just pass it on there. If we used ui-test or something we'd use //@ ignore-netbsd + //@ ignore-haiku return; }