OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef DWARF_READER_DWARF_FRAME_INFO_READER_H_ | |
6 #define DWARF_READER_DWARF_FRAME_INFO_READER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "common\dwarf\dwarf2reader.h" | |
11 | |
12 | |
13 namespace dwarf_reader { | |
14 | |
15 class IDwarfReader; | |
16 | |
17 /// The type this class inherits from is defined in breakpad. The functions | |
18 /// in this class get called as breakpad parses the DWARF information from the | |
19 /// binary file that is being debugged. This particular implementation fowards | |
20 /// the calls to a DWARF reader class, which can be written separately. | |
21 /// For detailed documentation on each function's expected behavior, please see | |
22 /// breakpad\dwarf2reader.h | |
23 class DwarfFrameInfoReader : public dwarf2reader::CallFrameInfo::Handler { | |
24 public: | |
25 explicit DwarfFrameInfoReader(IDwarfReader *reader); | |
26 | |
27 virtual bool Entry(size_t offset, | |
28 uint64 address, | |
29 uint64 length, | |
30 uint8 version, | |
31 const string &augmentation, | |
32 unsigned return_address); | |
33 | |
34 virtual bool UndefinedRule(uint64 address, int reg); | |
35 | |
36 virtual bool SameValueRule(uint64 address, int reg); | |
37 | |
38 virtual bool OffsetRule(uint64 address, | |
39 int reg, | |
40 int base_register, | |
41 long offset); | |
42 | |
43 virtual bool ValOffsetRule(uint64 address, | |
44 int reg, | |
45 int base_register, | |
46 long offset); | |
47 | |
48 virtual bool RegisterRule(uint64 address, int reg, int base_register); | |
49 | |
50 virtual bool ExpressionRule(uint64 address, | |
51 int reg, | |
52 const std::string &expression); | |
53 | |
54 virtual bool ValExpressionRule(uint64 address, | |
55 int reg, | |
56 const std::string &expression); | |
57 | |
58 virtual bool End(); | |
59 | |
60 private: | |
61 IDwarfReader* reader_; | |
62 }; | |
63 | |
64 } // namespace dwarf_reader | |
65 | |
66 #endif // DWARF_READER_ELF_SECTION_READER_H_ | |
OLD | NEW |