backtrace-rs icon indicating copy to clipboard operation
backtrace-rs copied to clipboard

Could hurd use some mach port chicanery and `vm_map`?

Open workingjubilee opened this issue 5 months ago • 1 comments

My understanding is that currently the /proc/self/maps implementation on Hurd exposes memory objects via their relevant mach ports as the "path", like [mem_obj={port_num}]. This seems like it might provide us with enough information that we can "simply" use the ultra-verbose vm_map (...with some wrapper code, obviously)... to map in the relevant segments of the relevant files.

I think emulating specifics of the /proc/self/maps implementation Linux has on Hurd may have made sense at one point but is ultimately a losing battle if one actually wants to make a different OS. See e.g. https://github.com/rust-lang/backtrace-rs/issues/671 which the Linux implementation may start to use soon enough.

cc @sthibaul

workingjubilee avatar Sep 15 '24 21:09 workingjubilee