]> git.baikalelectronics.ru Git - kernel.git/commit
scripts/faddr2line: improve on base path filtering a bit
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 19 Sep 2016 21:49:08 +0000 (14:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 19 Sep 2016 21:49:08 +0000 (14:49 -0700)
commit7f91c489735f58e18ba4adcf2f5ae5606fbfabfb
tree54192b2c448828a575ba0a04eac91fffb376660e
parent8169ac80bb7f1e1026e7735be9a487476858979b
scripts/faddr2line: improve on base path filtering a bit

Due to our compiler include directives, the build pathnames for header
files often end up being of the form "$srcdir/./include/linux/xyz.h",
which ends up having that extra "." path component after the build base
in it.

Teach faddr2line to skip that too, to make code generated in inline
functions in header files match the filename for the regular C files.

Rabin Vincent pointed out that I can't make a stricter regexp match by
using the " at " prefix for the pathname, because that ends up being
locale-dependent.  But this does require that the path match be preceded
by a space, to make it a bit more strict (that matters mainly if we
didn't find any base_dir at all, and we only end up with the "./" part
of the match)

Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Rabin Vincent <rabin@rab.in>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/faddr2line