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

Side by Side Diff: syzygy/refinery/analyzers/type_propagator_analyzer.h

Issue 1475083002: [Refinery] Introduce TypePropagatorAnalyzer - pointer types. (Closed) Base URL: https://github.com/google/syzygy.git@master
Patch Set: Final nit Created 5 years 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
OLDNEW
(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 // TODO(manzagop): The analyzer currently does a single analysis pass over the
29 // contents of the typed block layer. Add processing for the newly generated
30 // types.
31 // TODO(manzagop): The analyzer may be called more than once, eg if another
32 // analyzer produces new typed blocks. Have a mechanism to avoid re-processing
33 // previously analyzed typed blocks.
34 class TypePropagatorAnalyzer : public Analyzer {
35 public:
36 explicit TypePropagatorAnalyzer(
37 scoped_refptr<SymbolProvider> symbol_provider);
38 const char* name() const override { return kTypePropagatorAnalyzerName; }
39
40 AnalysisResult Analyze(const minidump::Minidump& minidump,
41 ProcessState* process_state) override;
42
43 private:
44 bool AnalyzeTypedData(const TypedData& data, ProcessState* process_state);
45 bool AnalyzeTypedDataUDT(const TypedData& typed_data,
46 ProcessState* process_state);
47 bool AnalyzeTypedDataPointer(const TypedData& typed_data,
48 ProcessState* process_state);
49 bool AnalyzeTypedDataArray(const TypedData& typed_data,
50 ProcessState* process_state);
51
52 bool AddTypedBlock(const TypedData& typed_data, ProcessState* process_state);
53
54 static const char kTypePropagatorAnalyzerName[];
55
56 scoped_refptr<SymbolProvider> symbol_provider_;
57
58 DISALLOW_COPY_AND_ASSIGN(TypePropagatorAnalyzer);
59 };
60
61 } // namespace refinery
62
63 #endif // SYZYGY_REFINERY_ANALYZERS_TYPE_PROPAGATOR_ANALYZER_H_
OLDNEW
« no previous file with comments | « syzygy/refinery/analyzers/stack_frame_analyzer_impl.cc ('k') | syzygy/refinery/analyzers/type_propagator_analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698