Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 Google Inc. All Rights Reserved. | |
| 2 // | |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 // you may not use this file except in compliance with the License. | |
| 5 // You may obtain a copy of the License at | |
| 6 // | |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 // | |
| 9 // Unless required by applicable law or agreed to in writing, software | |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 // See the License for the specific language governing permissions and | |
| 13 // limitations under the License. | |
| 14 | |
| 15 #ifndef SYZYGY_REFINERY_ANALYZERS_TYPE_PROPAGATOR_ANALYZER_H_ | |
| 16 #define SYZYGY_REFINERY_ANALYZERS_TYPE_PROPAGATOR_ANALYZER_H_ | |
| 17 | |
| 18 #include "base/macros.h" | |
| 19 #include "base/memory/ref_counted.h" | |
| 20 #include "syzygy/refinery/analyzers/analyzer.h" | |
| 21 #include "syzygy/refinery/symbols/symbol_provider.h" | |
| 22 #include "syzygy/refinery/types/typed_data.h" | |
| 23 | |
| 24 namespace refinery { | |
| 25 | |
| 26 // The type propagator looks for typed pointers in existing typed blocks, | |
| 27 // and propagates the type to the destination block. | |
| 28 class TypePropagatorAnalyzer : public Analyzer { | |
|
Sigurður Ásgeirsson
2015/11/26 21:45:12
this is very exciting!
manzagop (departed)
2015/11/27 15:20:28
TOTALLY!
| |
| 29 public: | |
| 30 explicit TypePropagatorAnalyzer( | |
| 31 scoped_refptr<SymbolProvider> symbol_provider); | |
| 32 const char* name() const override { return kTypePropagatorAnalyzerName; } | |
| 33 | |
| 34 AnalysisResult Analyze(const minidump::Minidump& minidump, | |
| 35 ProcessState* process_state) override; | |
| 36 | |
| 37 private: | |
| 38 bool AnalyzeTypedData(const TypedData& data, ProcessState* process_state); | |
| 39 bool AnalyzeTypedDataUDT(const TypedData& typed_data, | |
| 40 ProcessState* process_state); | |
| 41 bool AnalyzeTypedDataPointer(const TypedData& typed_data, | |
| 42 ProcessState* process_state); | |
| 43 bool AnalyzeTypedDataArray(const TypedData& typed_data, | |
| 44 ProcessState* process_state); | |
| 45 | |
| 46 bool AddTypedBlock(const TypedData& typed_data, ProcessState* process_state); | |
| 47 | |
| 48 static const char kTypePropagatorAnalyzerName[]; | |
| 49 | |
| 50 scoped_refptr<SymbolProvider> symbol_provider_; | |
| 51 | |
| 52 DISALLOW_COPY_AND_ASSIGN(TypePropagatorAnalyzer); | |
| 53 }; | |
| 54 | |
| 55 } // namespace refinery | |
| 56 | |
| 57 #endif // SYZYGY_REFINERY_ANALYZERS_TYPE_PROPAGATOR_ANALYZER_H_ | |
| OLD | NEW |