OLD | NEW |
---|---|
1 // Copyright (c) 2010 Google Inc. | 1 // Copyright (c) 2010 Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
907 DISALLOW_COPY_AND_ASSIGN(MinidumpLinuxMaps); | 907 DISALLOW_COPY_AND_ASSIGN(MinidumpLinuxMaps); |
908 }; | 908 }; |
909 | 909 |
910 // MinidumpLinuxMapsList corresponds to the Linux-exclusive MD_LINUX_MAPS | 910 // MinidumpLinuxMapsList corresponds to the Linux-exclusive MD_LINUX_MAPS |
911 // stream, which contains the contents of /prod/self/maps, which contains | 911 // stream, which contains the contents of /prod/self/maps, which contains |
912 // the mapped memory regions and their access permissions. | 912 // the mapped memory regions and their access permissions. |
913 class MinidumpLinuxMapsList : public MinidumpStream { | 913 class MinidumpLinuxMapsList : public MinidumpStream { |
914 public: | 914 public: |
915 virtual ~MinidumpLinuxMapsList(); | 915 virtual ~MinidumpLinuxMapsList(); |
916 | 916 |
917 // Get number of mappings. | |
918 unsigned int mapping_count() const { return valid_ ? maps_count_ : 0; } | |
ivanpe
2015/08/12 00:26:23
Getter should match the name of the variable: http
liuandrew
2015/08/14 22:43:36
Done.
| |
919 | |
917 // Get mapping at the given memory address. The caller owns the pointer. | 920 // Get mapping at the given memory address. The caller owns the pointer. |
918 const MinidumpLinuxMaps *GetLinuxMapsForAddress(uint64_t address) const; | 921 const MinidumpLinuxMaps *GetLinuxMapsForAddress(uint64_t address) const; |
919 // Get mapping at the given index. The caller owns the pointer. | 922 // Get mapping at the given index. The caller owns the pointer. |
920 const MinidumpLinuxMaps *GetLinuxMapsAtIndex(unsigned int index) const; | 923 const MinidumpLinuxMaps *GetLinuxMapsAtIndex(unsigned int index) const; |
921 | 924 |
922 // Print the contents of /proc/self/maps to stdout. | 925 // Print the contents of /proc/self/maps to stdout. |
923 void Print(); | 926 void Print(); |
924 | 927 |
925 private: | 928 private: |
926 friend class Minidump; | 929 friend class Minidump; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1116 // construction or after a failed Read(); true following a successful | 1119 // construction or after a failed Read(); true following a successful |
1117 // Read(). | 1120 // Read(). |
1118 bool valid_; | 1121 bool valid_; |
1119 }; | 1122 }; |
1120 | 1123 |
1121 | 1124 |
1122 } // namespace google_breakpad | 1125 } // namespace google_breakpad |
1123 | 1126 |
1124 | 1127 |
1125 #endif // GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ | 1128 #endif // GOOGLE_BREAKPAD_PROCESSOR_MINIDUMP_H__ |
OLD | NEW |