[compiler-rt] r197671 - [Sanitizer] Delete unused StackTrace::PrintStack argument

Alexey Samsonov samsonov at google.com
Thu Dec 19 03:14:26 PST 2013


Author: samsonov
Date: Thu Dec 19 05:14:26 2013
New Revision: 197671

URL: http://llvm.org/viewvc/llvm-project?rev=197671&view=rev
Log:
[Sanitizer] Delete unused StackTrace::PrintStack argument

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc?rev=197671&r1=197670&r2=197671&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc Thu Dec 19 05:14:26 2013
@@ -36,8 +36,7 @@ static void PrintStackFramePrefix(Intern
   buffer->append("    #%zu 0x%zx", frame_num, pc);
 }
 
-void StackTrace::PrintStack(const uptr *addr, uptr size,
-                            SymbolizeCallback symbolize_callback) {
+void StackTrace::PrintStack(const uptr *addr, uptr size) {
   if (addr == 0 || size == 0) {
     Printf("    <empty stack>\n\n");
     return;
@@ -53,21 +52,6 @@ void StackTrace::PrintStack(const uptr *
     uptr pc = GetPreviousInstructionPc(addr[i]);
     uptr addr_frames_num = 0;  // The number of stack frames for current
                                // instruction address.
-    if (symbolize_callback) {
-      if (symbolize_callback((void*)pc, buff.data(), buff.size())) {
-        addr_frames_num = 1;
-        frame_desc.clear();
-        PrintStackFramePrefix(&frame_desc, frame_num, pc);
-        // We can't know anything about the string returned by external
-        // symbolizer, but if it starts with filename, try to strip path prefix
-        // from it.
-        frame_desc.append(
-            " %s",
-            StripPathPrefix(buff.data(), common_flags()->strip_path_prefix));
-        Printf("%s\n", frame_desc.data());
-        frame_num++;
-      }
-    }
     if (common_flags()->symbolize && addr_frames_num == 0) {
       // Use our own (online) symbolizer, if necessary.
       if (Symbolizer *sym = Symbolizer::GetOrNull())

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h?rev=197671&r1=197670&r2=197671&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h Thu Dec 19 05:14:26 2013
@@ -38,8 +38,7 @@ struct StackTrace {
   uptr trace[kStackTraceMax];
 
   // Prints a symbolized stacktrace, followed by an empty line.
-  static void PrintStack(const uptr *addr, uptr size,
-                         SymbolizeCallback symbolize_callback = 0);
+  static void PrintStack(const uptr *addr, uptr size);
 
   void CopyFrom(const uptr *src, uptr src_size) {
     top_frame_bp = 0;





More information about the llvm-commits mailing list