[llvm] r252118 - [Windows] Symbolize with llvm-symbolizer instead of dbghelp in a self-host
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 7 08:53:57 PST 2015
On Wed, Nov 4, 2015 at 8:07 PM, Reid Kleckner via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: rnk
> Date: Wed Nov 4 19:07:54 2015
> New Revision: 252118
>
> URL: http://llvm.org/viewvc/llvm-project?rev=252118&view=rev
> Log:
> [Windows] Symbolize with llvm-symbolizer instead of dbghelp in a self-host
>
> Summary:
> llvm-symbolizer understands both PDBs and DWARF, so it is more likely to
> succeed at symbolization. If llvm-symbolizer is unavailable, we will
> fall back to dbghelp. This also makes our crash traces more similar
> between Windows and Linux.
>
Hi Reid,
I think this commit broke FreeBSD build with -Werror.
[87/3410] Building CXX object
lib/Suppo...MakeFiles/LLVMSupport.dir/Signals.cpp.o
../lib/Support/Signals.cpp:66:13: warning: unused function
'printSymbolizedStackTrace' [-Wunused-function]
static bool printSymbolizedStackTrace(void **StackTrace, int Depth,
^
../lib/Support/Signals.cpp:52:13: warning: function
'findModulesAndOffsets' has internal linkage but is not defined
[-Wundefined-internal]
static bool findModulesAndOffsets(void **StackTrace, int Depth,
^
../lib/Support/Signals.cpp:87:8: note: used here
if (!findModulesAndOffsets(StackTrace, Depth, Modules.data(), Offsets.data(),
^
2 warnings generated.
Do you think the following fix is reasonable?
Index: lib/Support/Signals.cpp
===================================================================
--- lib/Support/Signals.cpp (revision 252404)
+++ lib/Support/Signals.cpp (working copy)
@@ -49,6 +49,7 @@
using namespace llvm;
+#if defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
static bool findModulesAndOffsets(void **StackTrace, int Depth,
const char **Modules, intptr_t *Offsets,
const char *MainExecutableName,
@@ -158,6 +159,7 @@
}
return true;
}
+#endif // defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
// Include the platform-specific parts of this class.
#ifdef LLVM_ON_UNIX
Thank you,
--
Davide
More information about the llvm-commits
mailing list