1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tools/profiler/local_debug_info_symbolizer.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef PROCESSOR_LOCAL_DEBUG_INFO_SYMBOLIZER_H_ 1.10 +#define PROCESSOR_LOCAL_DEBUG_INFO_SYMBOLIZER_H_ 1.11 + 1.12 +#include "google_breakpad/processor/stack_frame_symbolizer.h" 1.13 + 1.14 +#include <map> 1.15 +#include <vector> 1.16 + 1.17 +namespace google_breakpad { 1.18 + 1.19 +class Module; 1.20 + 1.21 +class LocalDebugInfoSymbolizer : public StackFrameSymbolizer { 1.22 + public: 1.23 + using StackFrameSymbolizer::SymbolizerResult; 1.24 + LocalDebugInfoSymbolizer(const std::vector<string>& debug_dirs) : 1.25 + StackFrameSymbolizer(NULL, NULL), 1.26 + debug_dirs_(debug_dirs) {} 1.27 + virtual ~LocalDebugInfoSymbolizer(); 1.28 + 1.29 + virtual SymbolizerResult FillSourceLineInfo(const CodeModules* modules, 1.30 + const SystemInfo* system_info, 1.31 + StackFrame* stack_frame); 1.32 + 1.33 + virtual WindowsFrameInfo* FindWindowsFrameInfo(const StackFrame* frame); 1.34 + 1.35 + virtual CFIFrameInfo* FindCFIFrameInfo(const StackFrame* frame); 1.36 + 1.37 + // Lie to the stackwalker to short-circuit stack-scanning heuristics. 1.38 + virtual bool HasImplementation() { return false; } 1.39 + 1.40 + private: 1.41 + typedef std::map<string, Module*> SymbolMap; 1.42 + SymbolMap symbols_; 1.43 + std::vector<string> debug_dirs_; 1.44 +}; 1.45 + 1.46 +} // namespace google_breakpad 1.47 + 1.48 +#endif // PROCESSOR_LOCAL_DEBUG_INFO_SYMBOLIZER_H_