This is the mail archive of the
mailing list for the elfutils project.
Re: linux-pid-attach.c on non-Linux hosts
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 22 Apr 2014 13:28:20 +0200
- Subject: Re: linux-pid-attach.c on non-Linux hosts
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