[PATCH] D59553: llvm-symbolizer shows incorrect source line info if --gc-sections used
Denis Antrushin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 20 05:38:48 PDT 2019
dantrushin added a comment.
In D59553#1435134 <https://reviews.llvm.org/D59553#1435134>, @avl wrote:
> I am not sure about using grep and sed in the test. I see it used in other parts of llvm but not inside lld.
You don't need grep here at all:
sed -n '/DW_AT_low_pc/ s|[_a-wyzA-WYZ() \t]||gp'
But your pattern is incorrect - it deletes a-f symbols from your hex digit :)
Something like this is a bit more complex, but is more correct:
sed -n '/DW_AT_low_pc/ s|.*(\(0x[0-9a-f]*\)).*|\1|p'
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59553/new/
https://reviews.llvm.org/D59553
More information about the llvm-commits
mailing list