tools/profiler/local_debug_info_symbolizer.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef PROCESSOR_LOCAL_DEBUG_INFO_SYMBOLIZER_H_
     7 #define PROCESSOR_LOCAL_DEBUG_INFO_SYMBOLIZER_H_
     9 #include "google_breakpad/processor/stack_frame_symbolizer.h"
    11 #include <map>
    12 #include <vector>
    14 namespace google_breakpad {
    16 class Module;
    18 class LocalDebugInfoSymbolizer : public StackFrameSymbolizer {
    19  public:
    20   using StackFrameSymbolizer::SymbolizerResult;
    21   LocalDebugInfoSymbolizer(const std::vector<string>& debug_dirs) :
    22       StackFrameSymbolizer(NULL, NULL),
    23       debug_dirs_(debug_dirs) {}
    24   virtual ~LocalDebugInfoSymbolizer();
    26   virtual SymbolizerResult FillSourceLineInfo(const CodeModules* modules,
    27                                               const SystemInfo* system_info,
    28                                               StackFrame* stack_frame);
    30   virtual WindowsFrameInfo* FindWindowsFrameInfo(const StackFrame* frame);
    32   virtual CFIFrameInfo* FindCFIFrameInfo(const StackFrame* frame);
    34   // Lie to the stackwalker to short-circuit stack-scanning heuristics.
    35   virtual bool HasImplementation() { return false; }
    37  private:
    38   typedef std::map<string, Module*> SymbolMap;
    39   SymbolMap symbols_;
    40   std::vector<string> debug_dirs_;
    41 };
    43 }  // namespace google_breakpad
    45 #endif  // PROCESSOR_LOCAL_DEBUG_INFO_SYMBOLIZER_H_

mercurial