[PATCH] Support Mach-O universal binaries in llvm-symbolizer

Alexey Samsonov samsonov at google.com
Wed Jun 26 04:00:44 PDT 2013



================
Comment at: docs/CommandGuide/llvm-symbolizer.rst:72
@@ +71,3 @@
+
+ If a binary contains object files for multiple architectures (e.g. it is a Mac
+ universal binary), symbolize the object file for a given architecture. You can
----------------
Alexander Potapenko wrote:
> Mach-O universal binary
Done

================
Comment at: test/DebugInfo/Inputs/macho-universal.cc:9
@@ +8,3 @@
+
+// Built with Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
+// clang++ -arch x86_64 -arch i386 macho-universal.cc
----------------
Alexander Potapenko wrote:
> Why not use the current Clang to build the binary? It'll be easier to reproduce if needed.
> Also, I'd put the comment on the top of the file (unless you're following some LLVM convention)
I think the test is easier to reproduce if it's built with a fixed released version of compiler than with trunk-clang at random revision. E.g. other binary inputs in this folder are also built with Clang 3.2 release.

Moved comment to the top.

================
Comment at: test/DebugInfo/llvm-symbolizer.test:11
@@ -9,1 +10,3 @@
+RUN: llvm-symbolizer --functions --inlining --demangle=false \
+RUN:    --default-arch=i386 < %t.input | FileCheck %s
 
----------------
Alexander Potapenko wrote:
> How does it behave without --default-arch?
Good point. If arch is not specified for a universal binary (via --default-arch or via <binary>:<arch>), the address is not symbolized. I've added a test and mentioned it in the manual


http://llvm-reviews.chandlerc.com/D1029



More information about the llvm-commits mailing list