[PATCH] D57049: [llvm-symbolizer] Improve compatibility of llvm-symbolizer --functions with GNU addr2line

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 23 01:42:10 PST 2019


jhenderson marked an inline comment as done.
jhenderson added inline comments.


================
Comment at: test/tools/llvm-symbolizer/functions.test:3
+
+# RUN: llvm-symbolizer 0 --obj=%p/Inputs/functions.o | FileCheck %s --check-prefix=LINKAGE
+# RUN: llvm-symbolizer 0 --functions --obj=%p/Inputs/functions.o | FileCheck %s --check-prefix=LINKAGE
----------------
ruiu wrote:
> Can't tests for llvm-symbolizer depend on llvm-mc? If it can, can you represent `functions.o` in assembly and assemble it at test-time so that you can avoid checking in a binary file?
I tried that first using `llvm-mc -g` but that produces `??` for the function name of `--functions=short`. I could be persuaded that that's fine, because it shows a difference in behaviour between them, but it doesn't really test short function names.

Another alternative would be to create manually-written .debug* data. I'll have a look and see if that's practical, but I think that would make the test somewhat harder to read.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57049/new/

https://reviews.llvm.org/D57049





More information about the llvm-commits mailing list