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_LINE_PARSER_H_ | |
6 #define DWARF_READER_DWARF_LINE_PARSER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "common/dwarf/dwarf2reader.h" | |
11 | |
12 namespace dwarf_reader { | |
13 | |
14 class IDwarfReader; | |
15 class ParseState; | |
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 DwarfLineParser : public dwarf2reader::LineInfoHandler { | |
24 public: | |
25 DwarfLineParser(ParseState *parse_state, IDwarfReader *reader); | |
26 | |
27 virtual void DefineDir(const std::string& name, uint32 dir_num); | |
28 | |
29 virtual void DefineFile(const std::string& name, | |
30 int32 file_num, | |
31 uint32 dir_num, | |
32 uint64 mod_time, | |
33 uint64 length); | |
34 | |
35 virtual void AddLine(uint64 address, | |
36 uint64 length, | |
37 uint32 file_num, | |
38 uint32 line_num, | |
39 uint32 column_num); | |
40 | |
41 private: | |
42 ParseState *parse_state_; | |
43 IDwarfReader *reader_; | |
44 }; | |
45 | |
46 } // namespace dwarf_parser | |
47 | |
48 #endif // DWARF_READER_DWARF_LINE_PARSER_H_ | |
OLD | NEW |