]> sourceware.org Git - systemtap.git/commit
Fix searching of kernel_source_tree for kernel built with O option
authorHou Tao <houtao1@huawei.com>
Mon, 10 Sep 2018 11:46:27 +0000 (19:46 +0800)
committerFrank Ch. Eigler <fche@redhat.com>
Tue, 16 Oct 2018 15:13:31 +0000 (11:13 -0400)
commitf3fdcc9368e7a714a3ddd6af2a2a3aa44af33ac2
treeedcd59df0670d06e8841b98abb4db85c7a7b6528
parentdd57c73873b184b329f47bd186fa77e6d842eac0
Fix searching of kernel_source_tree for kernel built with O option

When generating kernel module for a systemtap script that uses trace-point
probe, if the vanilla kernel is built by using O=build_path option and
r=build_path option is passed to stap, stap will not be able to find
kernel_source_tree and will fail on pass-2.

Linux kernel will create a symlink named source to the source tree
for out-of-source build since (399b835be30e "kbuild: add a symlink
to the source for separate objdirs"), so fix the problem by checking
whether or not the symlink exists and using it as the kernel_source_tree.

Also using a new helper dir_exists() instead of file_exists() to
ensure the existence of the directory of source tree.

Signed-off-by: Hou Tao <houtao1@huawei.com>
tapsets.cxx
util.cxx
util.h
This page took 0.025805 seconds and 5 git commands to generate.