linux-pid-attach.c on non-Linux hosts

Kurt Roeckx kurt at roeckx.be
Tue Apr 22 19:52:56 UTC 2014


On Tue, Apr 22, 2014 at 01:28:20PM +0200, Mark Wielaard wrote:
> Hi Kurt,
> 
> On Mon, 2014-04-21 at 22:39 +0200, Kurt Roeckx wrote:
> > It seems linux-pid-attach.c doesn't build on any of the non-Linux
> > hosts, which is probably normal given it's name.  FreeBSD has a
> > problem with the everything related to pthread while Hurd seems
> > to only have a problem with syscall __NR_tkill.
> > 
> > How do you suggest I deal with that?
> 
> I think libdwfl functions that rely on the specifics of GNU/Linux
> (kernel/modules, core file format, proc fs, signals/ptrace) can just
> return NULL and fail on other platforms. So just ifdef out the code in
> that file. And implement dwfl_linux_proc_attach and the internal
> functions __libdwfl_ptrace_attach __libdwfl_ptrace_detach
> dwfl_linux_proc_attach __libdwfl_get_pid_arg as always failing in that
> case.

The attached patch seems to be working for me on kFreeBSD.

PS: run-nm-self.sh fails for me for current master.


Kurt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Unwinding-is-only-supported-on-Linux.patch
Type: text/x-diff
Size: 8630 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20140422/9e9c78ed/attachment.bin>


More information about the elfutils-devel mailing list