Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/processor/basic_code_modules.h

Issue 2060663002: Server-side workaround to handle overlapping modules. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Fix whitespace. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/processor/basic_code_module.h ('k') | src/processor/basic_code_modules.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006, Google Inc. 1 // Copyright (c) 2006, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 // implementation a place to store information when the life of the original 36 // implementation a place to store information when the life of the original
37 // object (such as a MinidumpModuleList) cannot be guaranteed. 37 // object (such as a MinidumpModuleList) cannot be guaranteed.
38 // 38 //
39 // Author: Mark Mentovai 39 // Author: Mark Mentovai
40 40
41 #ifndef PROCESSOR_BASIC_CODE_MODULES_H__ 41 #ifndef PROCESSOR_BASIC_CODE_MODULES_H__
42 #define PROCESSOR_BASIC_CODE_MODULES_H__ 42 #define PROCESSOR_BASIC_CODE_MODULES_H__
43 43
44 #include <stddef.h> 44 #include <stddef.h>
45 45
46 #include <vector>
47
46 #include "google_breakpad/processor/code_modules.h" 48 #include "google_breakpad/processor/code_modules.h"
47 #include "processor/linked_ptr.h" 49 #include "processor/linked_ptr.h"
48 #include "processor/range_map.h" 50 #include "processor/range_map.h"
49 51
50 namespace google_breakpad { 52 namespace google_breakpad {
51 53
52 class BasicCodeModules : public CodeModules { 54 class BasicCodeModules : public CodeModules {
53 public: 55 public:
54 // Creates a new BasicCodeModules object given any existing CodeModules 56 // Creates a new BasicCodeModules object given any existing CodeModules
55 // implementation. This is useful to make a copy of the data relevant to 57 // implementation. This is useful to make a copy of the data relevant to
56 // the CodeModules and CodeModule interfaces without requiring all of the 58 // the CodeModules and CodeModule interfaces without requiring all of the
57 // resources that other implementations may require. A copy will be 59 // resources that other implementations may require. A copy will be
58 // made of each contained CodeModule using CodeModule::Copy. 60 // made of each contained CodeModule using CodeModule::Copy.
59 explicit BasicCodeModules(const CodeModules *that); 61 explicit BasicCodeModules(const CodeModules *that);
60 62
61 virtual ~BasicCodeModules(); 63 virtual ~BasicCodeModules();
62 64
63 // See code_modules.h for descriptions of these methods. 65 // See code_modules.h for descriptions of these methods.
64 virtual unsigned int module_count() const; 66 virtual unsigned int module_count() const;
65 virtual const CodeModule* GetModuleForAddress(uint64_t address) const; 67 virtual const CodeModule* GetModuleForAddress(uint64_t address) const;
66 virtual const CodeModule* GetMainModule() const; 68 virtual const CodeModule* GetMainModule() const;
67 virtual const CodeModule* GetModuleAtSequence(unsigned int sequence) const; 69 virtual const CodeModule* GetModuleAtSequence(unsigned int sequence) const;
68 virtual const CodeModule* GetModuleAtIndex(unsigned int index) const; 70 virtual const CodeModule* GetModuleAtIndex(unsigned int index) const;
69 virtual const CodeModules* Copy() const; 71 virtual const CodeModules* Copy() const;
72 virtual std::vector<linked_ptr<const CodeModule> >
73 GetShrunkRangeModules() const;
74 virtual bool IsModuleShrinkEnabled() const;
70 75
71 protected: 76 protected:
72 BasicCodeModules(); 77 BasicCodeModules();
73 78
74 // The base address of the main module. 79 // The base address of the main module.
75 uint64_t main_address_; 80 uint64_t main_address_;
76 81
77 // The map used to contain each CodeModule, keyed by each CodeModule's 82 // The map used to contain each CodeModule, keyed by each CodeModule's
78 // address range. 83 // address range.
79 RangeMap<uint64_t, linked_ptr<const CodeModule> > map_; 84 RangeMap<uint64_t, linked_ptr<const CodeModule> > map_;
80 85
86 // A vector of all CodeModules that were shrunk downs due to
87 // address range conflicts.
88 std::vector<linked_ptr<const CodeModule> > shrunk_range_modules_;
89
81 private: 90 private:
82 // Disallow copy constructor and assignment operator. 91 // Disallow copy constructor and assignment operator.
83 BasicCodeModules(const BasicCodeModules &that); 92 BasicCodeModules(const BasicCodeModules &that);
84 void operator=(const BasicCodeModules &that); 93 void operator=(const BasicCodeModules &that);
85 }; 94 };
86 95
87 } // namespace google_breakpad 96 } // namespace google_breakpad
88 97
89 #endif // PROCESSOR_BASIC_CODE_MODULES_H__ 98 #endif // PROCESSOR_BASIC_CODE_MODULES_H__
OLDNEW
« no previous file with comments | « src/processor/basic_code_module.h ('k') | src/processor/basic_code_modules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698