OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with 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 | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // and there aren’t expected to be very many of those that performance would | 59 // and there aren’t expected to be very many of those that performance would |
60 // become a problem. std::map is also guaranteed to be part of the standard | 60 // become a problem. std::map is also guaranteed to be part of the standard |
61 // library, which isn’t the case for std::unordered_map, which requires the | 61 // library, which isn’t the case for std::unordered_map, which requires the |
62 // C++11 library. In reality, std::unordered_map does not appear to provide | 62 // C++11 library. In reality, std::unordered_map does not appear to provide |
63 // a performance advantage. It appears that the memory copies currently done | 63 // a performance advantage. It appears that the memory copies currently done |
64 // by TaskMemory::Read() have substantially more impact on symbol table | 64 // by TaskMemory::Read() have substantially more impact on symbol table |
65 // operations. | 65 // operations. |
66 // | 66 // |
67 // This is public so that the type is available to | 67 // This is public so that the type is available to |
68 // MachOImageSymbolTableReaderInitializer. | 68 // MachOImageSymbolTableReaderInitializer. |
69 typedef std::map<std::string, SymbolInformation> SymbolInformationMap; | 69 using SymbolInformationMap = std::map<std::string, SymbolInformation>; |
70 | 70 |
71 MachOImageSymbolTableReader(); | 71 MachOImageSymbolTableReader(); |
72 ~MachOImageSymbolTableReader(); | 72 ~MachOImageSymbolTableReader(); |
73 | 73 |
74 //! \brief Reads the symbol table from another process. | 74 //! \brief Reads the symbol table from another process. |
75 //! | 75 //! |
76 //! This method must only be called once on an object. This method must be | 76 //! This method must only be called once on an object. This method must be |
77 //! called successfully before any other method in this class may be called. | 77 //! called successfully before any other method in this class may be called. |
78 //! | 78 //! |
79 //! \param[in] process_reader The reader for the remote process. | 79 //! \param[in] process_reader The reader for the remote process. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 private: | 126 private: |
127 SymbolInformationMap external_defined_symbols_; | 127 SymbolInformationMap external_defined_symbols_; |
128 InitializationStateDcheck initialized_; | 128 InitializationStateDcheck initialized_; |
129 | 129 |
130 DISALLOW_COPY_AND_ASSIGN(MachOImageSymbolTableReader); | 130 DISALLOW_COPY_AND_ASSIGN(MachOImageSymbolTableReader); |
131 }; | 131 }; |
132 | 132 |
133 } // namespace crashpad | 133 } // namespace crashpad |
134 | 134 |
135 #endif // CRASHPAD_SNAPSHOT_MAC_MACH_O_IMAGE_SYMBOL_TABLE_READER_H_ | 135 #endif // CRASHPAD_SNAPSHOT_MAC_MACH_O_IMAGE_SYMBOL_TABLE_READER_H_ |
OLD | NEW |